-
Notifications
You must be signed in to change notification settings - Fork 315
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
Ensures album view orders albums by album artist #1447
base: master
Are you sure you want to change the base?
Conversation
The fact that albumview reflects the user file sorting isnt a bug, its a helpful feature imho, specially for large collections. May i ask if its possible to implement some sort of settings which lets the user keep the sorting based on his/her folder structure. |
@theinfinityproject If you want to browse your collection by folder structure, particularly if you have a large music collection like we both do, then the 'Music Library' view is exactly what you are looking for. From there you can navigate the folder structure much faster than in the 'Albums' view. Why is that not much better for your use case? In the 'Albums' view:
The 'Albums' view just isn't designed to do what you want in a user-friendly fashion, nor should it be IMHO. IMHO adding a setting to maintain the current behavior is just adding a redundant feature to the 'Albums' view that is already solved better elsewhere. Your thoughts? |
Thanks for elaborating! I see your point. As I understand it, the 'Music Library' is technically what you are looking for. It just lacks album art. That is strange, because my 'Music Library' contains the exact same covers and layout options (grid/list) as the 'Albums' view, also on my Android phone. It's just as beautiful, just with folder based filtering. Yours really doesn't have album art? If that's the case, I'd say that is the problem we need to solve. This is the thing: People's folder structures serve different purposes. In our household for example, each member has the music they own in their own folder. If I'm looking for my own music, I use the 'Music Library' view. If I want to browse all the albums we own as a group, I'd appreciate a list of albums that is sorted CONSISTENTLY across the entire collection. In general, I'd say that browsing and sorting is something that should be entirely in the domain of the UI, i.e. sorting preferences should not impose any restrictions on how we can or can't organize our music collection on the file system. Tying the two together, as volumio does now, sacrifices a lot of flexibility, because we are no longer free to organize the filesystem independently of sorting/presentation considerations. Does this change your mind about anything? |
If this were all up to me (which it isn't) this is what I'd say: The whole point of the Albums, Artists and Genre views is specifically to allow us to browse our collections in ways that are independent of the file system. File system based browsing is what the Media Library view is for. Period. If we really need the exact same file system based layout that we currently have in the Albums view, then this should really be implemented as an additional layout option in the 'Music Library': hierarchical/flat + grid/list |
@andreas-henning thanks for the PR, this actually solves what I also see as a "misbehaviour" of sorting. That being said, I'm very busy ATM so checking & merging will take a while... |
It does, thats not my point. When i come home ill take a bunch of screenshots. Then its easier to see the difference.
I agree. But ur approach dosnt achieve that actually. Let me explain what i mean by pointing smth out we havnt talked about yet. The default behaviour in volumio as in most file system is to sort alphabetically. So as we open the media library view, we see folders sorted alphabetically, if we open Artist view, we see artists sorted alphabetically and the same is true for the Genre view. Ur proposal tho would differ from this, as it would sort albums within the Album view alphabetically based on the tag albumartist and not based on the tag albumname. The latter tho is imho the consistent approach, isnt it? So id like to opt for more flexibility and propose the following: Why not implement a simple Dropdown Menu within the Album view with the following options: Sort via
This would satisfy the request made by @volumio to be independent from FS while still increasing user flexibility and thus improving user experience. |
This is what I now think you are saying (rephrased in my own terms): Functionally, the 'Music Library' provides what I require. From a usability perspective it is in fact the superior solution. However, I prefer the 'Albums' view for aesthetic reasons, as it omits hierarchical folder navigation and instantly displays album art. What I'm looking for is the ability to maintain my folder based sorting without introducing any grouping and/or hierarchical navigation. If that's correct, I think that is how your requirement should be stated. However, I suspect there is still something of a misconception here. I suspect that to your mind, the 'Albums' view is primarily about getting straight to the album art, and that's why you want the option to sort by folder in that view. Although I'm anything but an authority on this, I'd say that's likely an incomplete understanding:
No. Grouping is not the same as sorting. Music Library = g(folder) / s(album artist) = hierarchically group by folder, sort albums by album artist Most views have an additional grouping. The groups represent filter options. After the filter is applied, the section of the results that displays albums are sorted by album artist (or at least that seems to be the intent). The 'Albums' view is the only view without a grouping, so there we get straight to the results, sorted by album artist. Because every list of albums is sorted in the exact same way, by album artist, sorting is in fact consistent across all views. My pull request ensures that sorting of albums is also consistent across installations, i.e. that people with more complicated folder structures have the same (and for most people actually useful) sorting experience as people with a single root folder for all their music. Either way, we completely agree that sorting is something users should be able to influence via a dropdown box (for every list, not just in the 'Albums' view). I've also talked with people who only listen to classical music, and would therefore prefer all album lists to be sorted by album name. A dropdown would allow for something like that too. We just don't have that (yet?). If volumio decides to integrate my pull request I might take a shot at that feature later on. Anyway, I hope I understood your requirement correctly now. If volumio accepts my pull request I'm sorry to say it likely will screw things up a bit for you. On the other hand, I think you'll remain better off than we are now. You will at least still have a way to find what your looking for. You'll just have to click once more in the 'Music Library' view, whereas many of us with more complicated folder structures currently have no way of systematically searching for albums at all, as views just aren't sorted in ways that are useful to us. I say we let volumio decide what happens now and then go from there. |
76f7694
to
77bb853
Compare
Andreas, could you explain on how to ensure that 7 different release of the very same album will be kept separated from each other if simply assuming that one could sort by an albumtitle? It doesn't work, as long as you accept that the metadata designed to told the albumtitle does get filled with the content which is the albumtitle, not with additioanl things which have to go in differnt metadataframes exclusivly being defined for such things such as albumversion or albumsubtitle MinimServer is amongst the very few pieces of software I'm aware of which has a dead stunning implementation to cover such topics. Since it differs for content between what's displayed and what's used for sorting. But as long as softare such as volumio, runeaudio, moode and others are limited to just a handfull of metadataframe (as it was way back in the 90th when using windows) you can't expect that sorting besides the physical structure would work. Perhaps with 50 albums, perhaps with 500 but not you collection passed 100K titels or more. So in case the Volumio software gets user sorting capabilities, please ensure that 1 sorting criteria remains which is "sort by physical structure". |
@commentsonly Ideally, this would work just as well as in minimserver. A few questions: 1 2 3 |
Just tested this, and indeed performance is very good. |
4 Andreas:
At the moment I could rename all my audio files similar to a database, from 1.flac till 100000.flac and I could even place these all into 1 big folder. Just noticed that Volumio does display aritst art if being placed in the artist folder if you have something such as <collection<aritst><albums>\ titles. For volumio I would have liked a similar ability such as what MinimServer offers. |
I've noted the feature request to define how items are displayed/labeled. |
|
@commentsonly
|
|
You're a master of evasion :-) Let's leave it at that. |
Not at all, but you're welcome to re-read what was posted. |
There's a lot of going-off-on-tangents that doesn't tell me anything I don't already know. You occasionally touch on potential solutions, which I find interesting, but isn't what I'm trying to understand. There is very little discussion of the actual problem, so there is nothing worth re-reading. |
Any ETA on this @volumio? Would be much appreciated! Thx! |
@volumio |
Purpose
The order of albums in the album view is partially dependent on the filesystem from which the albums were read, i.e. if audio files are stored in the folders 'A' and 'B', then all albums in 'A' are listed before those in 'B'.
This pull request ensures albums in the album view are always sorted by album artist, irrespective of folder structure.
I mentioned this in a forum post (here).
Consequences
For the majority of users, who's album folders all reside under a single root folder, these changes will make no difference. It affects only those with a more complicated folder structure. It can negatively affect those who (mis)used the filesystem specifically to influence album sorting in the Volumio UI.
Implementation:
For the 'Albums' view I opted for the Timsort algorithm for performance reasons, in particular because it is optimally suited to handling partially sorted lists, which the album array (as produced by mpd) is.
This is noticeably faster than JavaScript's
array.sort()
and much faster thansortOn()
. From my own tests running on a RPi3 sorting 1452 albums (a fourth of my collection):sortOn = 0.296 seconds
timSort = 0.053 seconds
In light of this, and because I couldn't find anything that actually used "sort-on", I removed it from packages.json.
Installation
Deploy source to Volumio host, then:
Timsort has a developer dependency on mdns which requires the file dns_sd.h. This is already included in the Volumio image for the RPi. Should it be missing on someone's custom Volumio host, it is distributed as part of libdns-dev:
Update (12.1.2018):
Stumbling blocks when sorting lists in genre and artist views
Ideally, albums and tracks would be ordered identically in all views. However, sorting albums and tracks in the genre or artist views introduces some issues:
Sorting all lists in all views in a consistent way requires the above issues to be fixed first.