OxygenCobalt / Auxio

A simple, rational music player for android
GNU General Public License v3.0
2.17k stars 146 forks source link

Sorting by date added #181

Closed arunava-nandy closed 2 years ago

arunava-nandy commented 2 years ago

Please add an option to sort the songs as per the date that is added it's very important as we like to listen to the songs that are added recently. It's important for user experience

OxygenCobalt commented 2 years ago

While I nominally reject this feature as a playlist since I don't benefit from it, I could tolerate this as a sorting option. I'll add it.

foss- commented 2 years ago

While I nominally reject this feature as a playlist since I don't benefit from it, I could tolerate this as a sorting option. I'll add it.

This is a standard sorting option in music players like Jellyfin, Plex etc. There certainly is benefit to it. Thanks for considering adding this.

OxygenCobalt commented 2 years ago

Seems reasonable then. I'll bundle this with the other metadata additions I'm planning and probably add it in 2.6.0.

OxygenCobalt commented 2 years ago

Quick question @foss- @arunava-nandy: Do you want sorting by the time the file was added to the library? Or the last time that it was modified?

foss- commented 2 years ago

Good question - I think added to library would be preferred. The idea with sort by date is probably having new items show at the top. Having 10 old albums on that list, because a better cover image was added, would spoil that idea. I guess for old files to show then, they would have to be removed and be re-added to the library and this is how plex and jellyfin behave if I am not mistaken.

OxygenCobalt commented 2 years ago

Sorry to keep bothering you @foss-, but I have more questions:

  1. Should Date Added sorting be allowed for albums/artists/genres? I don't know if that is expected functionality for such a sorting option.
  2. Should Date Added sorting be enabled in the artist/genre detail UI (What shows up when you click on an artist/genre)? Again, not sure if that is expected.
foss- commented 2 years ago
  1. Think this feature is expected for Albums, Songs. Briefly checked Jellyfin and Artists, Genre do not have this option.
  2. Again: checked Jellyfin - while they do not offer sorting by date added for Genre, they do offer this option after selecting a specific genre and while then in that view. Personally I think this makes sense, since in that view you are back to albums. I don't think this option is needed for the artist detail view listing the albums. Would expected the albums to show chronological by year.

Hope this helps.

OxygenCobalt commented 2 years ago

Thanks. This is my idea then:

This should be an easy implementation.

foss- commented 2 years ago

Hm, I don't think it makes much sense for Genre / Artist. Implementing it for consistencies sake is of course a valid argument. But why clutter the UI with options that won't get much use? Obviously I cannot prove this point and it is speculation. Which ever way this turns out, looking forward to this feature.

Also thanks so much for 2.5.0 and being so responsive. I am really enjoying Auxio 🙌

OxygenCobalt commented 2 years ago

You know what, you might actually be right. In the future, the semantic meaning of "Date Added" will be different in detail views due to Playlists, so I think it would be best to refrain adding it, actually.

OxygenCobalt commented 2 years ago

Okay, this feature seems ready to go for the next release. Closing this issue now.

OxygenCobalt commented 2 years ago

Identified a minor issue with the new date added sorting: There is no fast scroller indicator, so if you use the scroll-bar, the popup will just show "?".

I think I'll mitigate this by showing something like "X days ago" in the indicator. Does that sound reasonable @foss-?

foss- commented 2 years ago

Sorry, I am lacking context / knowledge to fully understand the situation. If you add a screenshot I may be able to understand and add my 2 cents. Currently still waiting for the F-Droid update to 2.6.0.

OxygenCobalt commented 2 years ago

Okay, here's a video @foss-:

https://user-images.githubusercontent.com/65370175/183672353-58647b99-3761-455a-83f7-4be5020662bb.mp4

When dragging using the scrollbar, a popup related to the current sort order is shown. For example, alphabetical sorting will show the first letter. However, I forgot to implement this for last added sorting, so it just shows up as "?".

I was wondering what should be put there to fill the same role. I think showing the particular date or "X days ago" would be the best option.

OxygenCobalt commented 2 years ago

As for 2.6.0, I've discovered a few bugs and inconsistencies in the new release, so I may leapfrog putting 2.6.0 on F-Droid and make a 2.6.1 release instead.

foss- commented 2 years ago

Thanks for the screencast - that is very helpful.

That's a hard one. Jellyfin does the following: If you sort albums by date you will still see an alphabet on the right side but you cannot scroll that alphabet. You can however tap a letter which then brings up all albums with that letter sorted by date added. How useful that is I don't know, but I never used it even once. Also I have no idea how to get back from that selection since I can only tap another letter but not remove that filter 🤔

Plex simply has no side menu (no alphabet) and when scrolling albums or songs sorted by date does not allow scrolling using the scrollbar.

I would suggest to either show nothing (Plex) or use your proposal (show time since adding album / song). Not being able to use scrollbar for scrolling is fair since the main purpose of sorting by data is to access recently added content.

Should you decide to go with time passed since adding content, maybe consider switching to actual year of when content has been added after 364 days, so that users would see 2021, 2020, ... or could be 2021-12, 2021-11, ... but that is not very elegant UI wise.

OxygenCobalt commented 2 years ago

Yeah, I think I'm going to use a plain date. I realized that a relative timestamp like "X days ago" must update as time goes on, which is kind-of weird. A fixed date seems best. Should be in the patch release I'm working on.