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

exclude folders #762

Closed
hhenne1 opened this issue May 26, 2020 · 4 comments
Closed

exclude folders #762

hhenne1 opened this issue May 26, 2020 · 4 comments
Assignees

Comments

@hhenne1
Copy link

hhenne1 commented May 26, 2020

I can't seen to find a way do exclude a folder from automatic scanning.
I tried adding .noaudio and/or .nomedia files to certain folders, but they get added anyway.. is there a way to exclude folders currently implemented?

@paulijar
Copy link
Collaborator

Such feature is not currently available, but it could be a feasible idea for future development. This is also quite similar to the feature request #760: the same outcome could be achieved with either of these two mechanisms, but depending on the case, one may be handier.

@dgedgedge
Copy link

dgedgedge commented Sep 25, 2020

Such a feature would be great.
I do have issues with Mac .AppleDouble directory.
It is difficult to avoid having them go to nextcloud folder when managing the file tree with Mac.

In the .AppleDouble you will find some files with the same name as the original file but with a content specific to Apple...
The files having the same extention, they are indexed by music.

The idea would be to have a generic feature to exclude some path based on regexpr and/or plain folder specification.

For example exclude files when they have /.AppleDouble/ pattern in their path.

I did looked to the code. It seems to me that the change should be located in method:
pathIsUnderMusicFolder of scanner.php.

The method whould have to be renamed in pathIsUnderMusicFolderAndValid.

Sorry I don't understand enough the code to be able to go further yet.

@paulijar paulijar self-assigned this Sep 27, 2020
paulijar added a commit to paulijar/music that referenced this issue Oct 3, 2020
The Settings view now has an option to define paths within the library base
path which shall be excluded from the music library. The exclude paths may
also be defined using wild cards ?, *, and **.

Any changes to the excluded paths currently take effect only upon rescan of
the library.

refs owncloud#762
paulijar added a commit that referenced this issue Oct 3, 2020
…vaialble

An invalid visibility constraint had been accidentally copy-pasted from
another table to this one.

refs #762
paulijar added a commit that referenced this issue Oct 3, 2020
…bsolete

The option `--remove-obsolete` on the command `occ music:scan` now removes
also any tracks which now reside in an excluded folder. This is in addition
to its former function of removing such tracks which are no longer accessible
by the user at all.

The new logic for the `--remove-obsolete` switch is also a lot more efficient
on huge libraries. As an example, checking for the obsolete files now took
~40 seconds on library of more than 60k tracks. With the old implementation,
I got tired of waiting and terminated the test after 10 minutes, so it was at
least 15 times slower and maybe much more.

refs #762
paulijar added a commit that referenced this issue Oct 3, 2020
Allow the text box to span the whole available space within its table cell.

refs #762
paulijar added a commit that referenced this issue Oct 4, 2020
Any exclude path pattern containing wild card characters was incorrectly
matched to also such paths, which began with the given pattern, but then had
some more characters after that. That is, the pattern was treated as if it had
a trailing '*' wild card even when it didn't. For example, pattern
/*/abc
matched also the file
/asdf/abcdef/some_file.mp3

refs #762
@paulijar
Copy link
Collaborator

paulijar commented Oct 6, 2020

This feature is implemented now, and will be part of the next release.
image

@paulijar
Copy link
Collaborator

paulijar commented Oct 18, 2020

Music v0.17.0 with this feature is now released.

When you add a folder to be excluded, no already scanned tracks are removed from the library. For the exclusions to take effect, you need to either reset and rescan the library, or use the command line utility
occ music:scan --remove-obsolete.

Please report if you find any problems with the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants