agersant / polaris-web

Web client for Polaris
https://github.com/agersant/polaris
MIT License
18 stars 12 forks source link

UI default sorting/alphabetization behavior #58

Open rayrrr opened 4 years ago

rayrrr commented 4 years ago

Many, many band and group names are in the form "The _____". Some music player software chooses to "ignore" the word "The" at the start of any artist name, so, for example, "The Band" would show up under B instead of T.

Can we add this feature?

Update: requirements so far from discussion below. All UI sort algorithms should:

agersant commented 4 years ago

Polaris presents the music collection based on the way files are organized on your file system, not based on the metadata in the files. This was a deliberate decision, driven by the frustration of not being able to manually organize content in other music software (which usually sorts by Genre > Artist > Album, or sometimes only Artist > Album).

File metadata does get used in the web UI when looking at individual songs (or songs in a folder which have a common value for the artist or album fields), but Polaris doesn't have the concept of an artist or a list of artists - just folders with songs in them. As a result, this suggestion is not quite applicable. You could get the same result by renaming your directories that start with The (without compromising on the accuracy of your metadata).

Anecdotally, only 3% of the artists in my collection start with 'The' but I imagine this number can look very different for specific genres.

rayrrr commented 4 years ago

Hmmm...glad to continue discussing this. Perhaps Polaris client should understand the meaning of the metadata a bit better.

Consider my collection: I have a bunch of digital files from throughout the early years of this century in a mix of MP3 and M4A formats, then a very large collection of digitized vinyl from my own collection in FLAC. I have my "digital born" and "digitized vinyl" files in two different parent folders. Now when I "Queue All" in Polaris client I see them in alphabetized "clumps" and I can't figure out how to "interweave" them let alone handle the "The" issue. It would also be nice to sort by artist name, album name, and song title in the UI; this would also require "understanding" of the metadata in the client.

Last thought for now: would you be open to alternative clients for Polaris? I am toying with the idea of building an isomorphic WASM Polaris client using https://github.com/yewstack/yew. If so maybe I can just include these kinds of features on that roadmap instead.

agersant commented 4 years ago

Perhaps Polaris client should understand the meaning of the metadata a bit better.

I think this is a good idea. The web UI has room for new panels. I could imagine a metadata-driven way to browse the collection as an addition to the file-system driven one. I would want to think about it a bit more before promising anything, but I could see this turning into a feature (and it would make sense to provide smart sorting options like eliding 'The' in this context).

I can't figure out how to "interweave" them

Could potentially be fixed by adding a sort button in the playlist panel but that seems a bit too specific. I do want to allow selection and drag-and-drop re-ordering eventually.

Last thought for now: would you be open to alternative clients for Polaris?

I would be very happy to see more Polaris clients! The server API is documented, which hopefully should help. Feel free to open issues if you need clarifications and I'll be happy to answer.

vosscodes commented 4 years ago

Now when I "Queue All" in Polaris client I see them in alphabetized "clumps" and I can't figure out how to "interweave" them let alone handle the "The" issue. It would also be nice to sort by artist name, album name, and song title in the UI; this would also require "understanding" of the metadata in the client.

In the same vein, it would be nice for things to be sortable by year, or, in lieu of drag and drop sorting, have a user definable sort string/order of operations that could sort an entire playlist by the user's preference. In one artist's folder, the albums folders came out in 2011 -> 2013 -> 2018 -> 2010, but when hitting queue all, they are queued in the order of 2018 -> 2010 -> 2013 -> 2011. It's a bit confusing that the result doesn't match the metadata, alphabet, or the folder structure.

Changing artists from The Artist to Artist, The would bug the heck out of me though, so please make that a config option if it ever becomes a thing ;)

agersant commented 4 years ago

@vosscodes Can you describe the exact file structure you have for these albums showing in inconsistent order so that I can reproduce it? The expected functionality is that directories and files should be sorted alphabetically based on path in the filesystem - both when browsing and in the playlist after pressing Queue All.

rayrrr commented 4 years ago

FWIW I have had a similar experience, when having multiple sources (like an MP3 collection and a digitized vinyl collection). It alphabetizes each and then places them sequentially, so first we see A-Z MP3s, then A-Z digitized vinyl (or whatever). That could be it.

Another note: no one is suggesting we make the UI change The Artist to Artist, The. My suggestion is to follow the paradigm of some other good music player software: the option to sort things like ABBA, The Artist, NWA instead of ABBA, NWA, The Artist.

rayrrr commented 4 years ago

One other aspect: alphabetization may be case sensitive (try ls -l in a directory with mixed case filenames for example). In that case you end up with two cohorts from any mixed case collection: A-Z and then a-z. So the UI sorts should always be case-insensitive.

vosscodes commented 4 years ago

FWIW I have had a similar experience, when having multiple sources (like an MP3 collection and a digitized vinyl collection). It alphabetizes each and then places them sequentially, so first we see A-Z MP3s, then A-Z digitized vinyl (or whatever). That could be it.

good eye, it didn't occur to me to check the sources. a mix of old CDs, .flac from bandcamp, and vinyl matches up to what winds up the UI perfectly.

agersant commented 4 years ago

I opened issues to keep track of implementing navigation through metadata:

Leaving this one open to keep track of allowing users to remove The prefix from artist names.