-
Notifications
You must be signed in to change notification settings - Fork 187
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
Make CherryMusic ignore hidden files #520
Comments
i See no reason why the would be a reason for a whitelist. just skip/hide hidden files everywhere. and I don't think we need to remove them retroactively. this would happen automatically when rescanning the files anyway, if we include make sure the filedb does not index them. On March 5, 2015 12:19:12 PM CET, Til Boerner [email protected] wrote:
|
No objections here, either. 👍 Also, I don't see the need for a whitelist. |
I looked at some example data. Filtering dot-anything is a bad idea. In fact, I think we need a smarter filter, or a blacklist, or we dont do this at all. Will post some examples when back @ keyboard. |
Alright, the vast majority of "true" hidden names are short and contain only alphabetical characters after the initial
as a filter. Interestingly, all files I found starting with a Here are some example "dotfile" (and directory) names. Some of the name-y bits are altered to protect the privacy of my data source. 😸 Non-alphabetic characters are the same as in the actual name. Example directory things that SHOULD NOT be filtered out:
Example file things that are pure metadata and SHOULD be filtered out:
Here are some clear names we want to filter:
|
Alright, I'd propose to use a regex blacklist. We can compile the regexes on server startup so there shouldn'd be any noticable performance difference. This list of filters might do the trick:
But of course there are more to come. Regex might already be overkill but I'd rather be safe than sorry. |
Yeah, let's treat the strings as regexes from the start. Would it be a bad idea to concat them all into a single expression like I'm wondering about this little fella: By the way, have you heard there's a new album by the_underscores, that well-known band of indie python coders? It's titled .___ (pronounced "attribute whitespace"). ;) But yes, I agree, they are quite silly and can't expect to be indexed by anyone. |
Proposal spawned by #518 (in which CherryMusic scans a
.git
directory):Hidden files in the
basedir
should be completely ignored by CherryMusic. CherryMusic's API should behave as if they didn't exist.For our purposes, a file is "hidden" if its name starts with a
.
. Not worth it to accomodate Windows here.We should make sure that hidden files are:
Some of these cases are already handled this way, but CM should be consistent here.
@devsnd, @6arms1leg: Interested to hear your comments. Any reasons why we shouldn't do this? Do we need a whitelist? If so, can we expect that list to remain small and manageable?
The text was updated successfully, but these errors were encountered: