Open LukeZBaker opened 1 year ago
Thanks for raising this issue.
Currently we're making the assumption that 'albums' are the leaf directories, that is that they don't contain subdirectories. I did this because it was an easy (and fast) way to sort lots of file paths. I added the directory 'depth' search for people that maybe have other categories like 'genre' or whatever, and then the 'tab' search acts as a good catch-all.
This approach doesn't work in the case that you point out as the cover art subdirectory is treated like an album. So the album won't appear in the 'album' search, and the subdirectory is loaded instead of the audio if you select it.
The options are:
Do a more thorough initial sort. Trade off is longer start up time. A shame if most use cases don't require it.
Keep the initial sort and use it for the 'tab' search as that sees all the directories. Then add an extra sorting step for the other search options.
Keep things as they are but add something like a '--prune' option that will ignore folders that only contain non audio files.
Personally I like finding the empty directory so i can either clean it up or grab the missing audio. First option is good if it's fast. Maybe it will look like some combo of first and second option. Will have to play around with it...
This issue should be solved with v0.4.6. We now have a more thorough sort on startup. Didn't seem to effect startup times (actually, it seems to be a a slight improvement, although my benchmarking is pretty crude).
Empty directories are ignored, as per your suggestion, along with directories that contain non-audio only.
If a directory that contains a mix of audio and subdirectories is selected then the directory will appear again alongside the subdirectories. Selecting it again loads it into the player. These types of directories get classified as artist and album so we're not hiding any files.
This seems to be working really well.
If you have a sub-directory that doesn't have any audio files or is empty, tap refuses to play the album even though the directory has audio files. Obviously that sub-directory could be removed, but some people may have non-audio files in sub-directories e.g. cover images.
Ideally, tap could just silently ignore sub-directories without audio files and still play the audio files found in the directory?
BTW, volume control is implemented beautifully without affecting the cleanness of the interface. Maybe it would be good to save the volume level so output is at the same level when restarting tap?