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

Add support for ignoring folders with .nomedia and .noimage #939

Conversation

jonjomckay
Copy link

This uses an event listener to record the paths of folders that contain a .nomedia or .noimage, and stores them as "excluded paths" in the database.

These excluded paths are then used to filter the view appropriately. Performing the filtering in the view is quite naive, but seems to be the best way for now, due to the limitations of using the WebDAV searchrequest function. If the app ends up moving to an app-specific API in the view, these paths can be used easily in the server-side API method, as they are.

Creation of an "included paths" table with the same schema is also included, which could be used to implement #141.

This is my first PR against anything Nextcloud-related, so let me know if I need to change anything!

This should fix #203, #234, #245, #537, #903 and #908.

@jonjomckay jonjomckay force-pushed the add-support-for-ignoring-folders branch from afda633 to 39ee18d Compare December 30, 2021 15:36
@jonjomckay jonjomckay force-pushed the add-support-for-ignoring-folders branch from 39ee18d to 368c023 Compare December 30, 2021 15:43
@jonjomckay
Copy link
Author

One thing I'm not sure about - should I add uid columns to the database tables? They should already be "namespaced" due to the full path being used...

@szaimen szaimen added this to the Nextcloud 24 milestone Jan 2, 2022
@szaimen szaimen added 3. to review Waiting for reviews enhancement New feature or request labels Jan 2, 2022
@jancborchardt
Copy link
Member

FYI regarding this pull request since @marcelklehr you also opened one regarding .nomedia filtering. cc @skjnldsv

@marcelklehr
Copy link
Member

@jonjomckay I only see event listeners for the nomedia bookkeeping in the code. How does this PR deal with already existing files?

@T-bond
Copy link

T-bond commented Mar 17, 2022

I think this can be closed, as #944 got merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Honor .nomedia file or similar
5 participants