Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Add Recursive Search for Files in OctoPrint Web SD #4826

Closed
dtibi opened this issue Jun 7, 2023 · 3 comments
Closed

[Request] Add Recursive Search for Files in OctoPrint Web SD #4826

dtibi opened this issue Jun 7, 2023 · 3 comments
Labels
done Done but not yet released request Feature request

Comments

@dtibi
Copy link

dtibi commented Jun 7, 2023

Is your feature request related to a problem? Please describe.

The current OctoPrint web SD file search feature only looks for files in the current directory view and does not search inside folders. This limitation can be frustrating when trying to locate specific files that are organized within folders.

Describe the solution you'd like

I would like the OctoPrint web SD file search feature to be enhanced so that it includes searching inside folders. This improvement would allow users to easily find files that are stored within nested folders and provide a more comprehensive search experience.

Additionally, I believe this enhancement should be included in OctoPrint's core rather than being implemented as a plugin. Searching inside folders is a common expectation for file management systems, and it would benefit a significant number of OctoPrint users who organize their files in a hierarchical structure.

Describe alternatives you've considered

Currently, there are no alternatives within OctoPrint's core for searching inside folders. Users may resort to manually navigating through the folder structure to locate specific files, which can be time-consuming and inconvenient.

Additional context

The ability to search inside folders would improve the overall usability of OctoPrint's file management system. It would streamline the file access process, particularly for users who have a large number of files and utilize folders for better organization. This enhancement would align OctoPrint with common file management practices and enhance the user experience.

image

@github-actions github-actions bot added the request Feature request label Jun 7, 2023
@dtibi dtibi changed the title [Request] [Request] Add Recursive Search for Files in OctoPrint Web SD Jun 7, 2023
dtibi added a commit to dtibi/OctoPrint that referenced this issue Jun 7, 2023
Updated the get_all_extensions function to search recursively instead of only listing the current directory. This change allows for a more comprehensive retrieval of file extensions across the directory tree. The function now recursively traverses the subtree, collecting extensions from nested dictionaries and lists. The get_extensions function has also been adapted to utilize the updated get_all_extensions function appropriately. 

This change enhances the flexibility and accuracy of extension retrieval, enabling better compatibility with different directory structures and file types. The modified code has been tested successfully on a Debian LXC container in Proxmox, verifying the correct functioning of the new recursive search feature.

Issue: OctoPrint#4826
@GitIssueBot
Copy link

This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there:

https://community.octoprint.org/t/enhancing-octoprint-web-sd-file-search/52316/1

@foosel
Copy link
Member

foosel commented Jun 12, 2023

The current OctoPrint web SD file search feature only looks for files in the current directory view and does not search inside folders.

That is incorrect.

Screencast.from.2023-06-12.11-28-38.webm

When you search for something, OctoPrint will show you only those folders in the list that contain files that contain the search phrase. So it IS limiting the results, but you still have to click into individual folders. This is done to match the UX when not having a search term entered. Consider it a filter, rather than a search like encountered in e.g. the Windows, also indicated through the placement of the search bar itself, which sits on top there to indicate that by entering search terms into it, you limit what you see below, but don't switch to a completely different type of view (which what you are requesting here would require).

@dtibi
Copy link
Author

dtibi commented Jun 12, 2023

😵‍💫 Oops! It seems I made a typo in the search, which led me to believe that it only searched in the current directory. In an attempt to fix it, I consulted ChatGPT, but as your comment on the pull request mentioned, it was actually unnecessary.
My mistake! Thank you for your detailed response.

@dtibi dtibi closed this as completed Jun 12, 2023
@github-actions github-actions bot added the done Done but not yet released label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Done but not yet released request Feature request
Projects
Status: Done
Development

No branches or pull requests

3 participants