Skip to content
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

Sorting by date added #181

Closed
arunava-nandy opened this issue Jul 7, 2022 · 17 comments
Closed

Sorting by date added #181

arunava-nandy opened this issue Jul 7, 2022 · 17 comments
Labels
enhancement New feature or request music Related to music loading

Comments

@arunava-nandy
Copy link

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

@arunava-nandy arunava-nandy added the enhancement New feature or request label Jul 7, 2022
@OxygenCobalt OxygenCobalt changed the title No option to sort songs date added to the folder Sorting by date modified Jul 7, 2022
@OxygenCobalt
Copy link
Owner

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.

@OxygenCobalt OxygenCobalt added the music Related to music loading label Jul 7, 2022
@OxygenCobalt OxygenCobalt changed the title Sorting by date modified Sorting by date added/modified Jul 7, 2022
@foss-
Copy link

foss- commented Jul 8, 2022

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
Copy link
Owner

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

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented Jul 9, 2022

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-
Copy link

foss- commented Jul 9, 2022

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 OxygenCobalt changed the title Sorting by date added/modified Sorting by date added Jul 11, 2022
@OxygenCobalt
Copy link
Owner

OxygenCobalt commented Jul 13, 2022

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.

OxygenCobalt added a commit that referenced this issue Jul 13, 2022
Add a "Last Added" sorting option to the home UI's song list.

I don't know if there is any demand for last added in other contexts.
That will be resolved later.
@foss-
Copy link

foss- commented Jul 13, 2022

  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
Copy link
Owner

OxygenCobalt commented Jul 13, 2022

Thanks. This is my idea then:

  • Last added will be available for albums, picking the earliest song added to the library.
  • Last added will be in the artist/genre detail UIs, simply for consistency. Artist albums don't have sorting anyway, so no worries about that.

This should be an easy implementation.

@foss-
Copy link

foss- commented Jul 13, 2022

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 added a commit that referenced this issue Jul 13, 2022
Added date added sorting to albums as well.

This implementation picks the earliest song in an album that was added
to the library and then uses that for sorting.
OxygenCobalt added a commit that referenced this issue Jul 13, 2022
Add a Last Added sort option to the artist and genre detail views.

This completes the last-added implementation.
@OxygenCobalt
Copy link
Owner

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 added a commit that referenced this issue Jul 13, 2022
Actually, this is not a good idea. No use as far as I am aware, and it
may semantically conflict with playlists.

This reverts commit 3d1dd2a.
@OxygenCobalt
Copy link
Owner

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

@OxygenCobalt
Copy link
Owner

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-
Copy link

foss- commented Aug 9, 2022

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
Copy link
Owner

OxygenCobalt commented Aug 9, 2022

Okay, here's a video @foss-:

output.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
Copy link
Owner

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-
Copy link

foss- commented Aug 9, 2022

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request music Related to music loading
Projects
None yet
Development

No branches or pull requests

3 participants