music icon indicating copy to clipboard operation
music copied to clipboard

[Feature request] Showing tracks by date added, most recent first

Open etyrnal opened this issue 3 years ago • 11 comments

Please ad ability to sort search results and global track list by date added, most recent first.

etyrnal avatar Oct 04 '21 16:10 etyrnal

Probably not gonna happen for the search results, as the search function is essentially just filtering the current view. But having an option in the All tracks view to change the ordering would be doable and shall be considered. And if you would then search within the All tracks view having your preferred order, you would get the same end result as if would first search and then sort the results.

paulijar avatar Oct 06 '21 18:10 paulijar

This sounds like a great 'compromise'. Thanks for considering!

etyrnal avatar Oct 07 '21 19:10 etyrnal

This idea seems great to me too, thank you very much!

The only remaining interrogation I have is regarding the selection of separators that would be used instead of alphabetical letters: months ? years ? When you have over 10k musics in the app, scrolling quickly to the right period of time can be difficult.

@etyrnal mentions a sorting by date added. Just to be sure, do we talk about date added on nextcloud instance or date added inside the Musics app import ?

Edit: typo

TtuxX avatar Oct 12 '21 13:10 TtuxX

This idea seems great to me too, thank you very much!

The only remaining interrogation I have is regarding the selection of separators that would be used instead of alphabetical letters: months ? years ? When you have over 10k musics in the app, scrolling quickly to the right period of time can be difficult.

@etyrnal mentions a sorting by date added. Just to be sure, do we talk about date added on nextcloud instance or date added inside the Musics app import ?

Edit: typo

great question.

It's becomes even more complicated in my instance. My music folder is in an 'external storage'. So, in MY case, it would be the file creation date. But in your case, if the music is on the actual NC server, i would want it to be the date it was added to the NC server.

This creates a problem in one scenario tho. When the NC server is FIRST set up, it will be adding an entire music collection all at once. In this case, if the date of the track is set to the date the music app, and or the NC server first indexes/becomes aware of the thousands of files, there will be THOUSANDS of files all being shown as being added on the same date. Would be amazing if it could be sorted by date ADD and/or file creation/modification date.

Not trying to make it complicated -- it just is.

lolcry

etyrnal avatar Oct 12 '21 14:10 etyrnal

Seems nice to me!

I'm thinking about drawing a draft of interface in an editor to get an idea about how could hierarchical sorting be implemented in a simple manner for the end-user. However, having at the same time "File upload date", "File creation date" and "File modification date" hierarchical cumulative sorting will be complex to implement I think.

Also, the main issue to me is that creation date is not something applicable to Linux-related systems and might not make sense on the majority of Nextcloud instances. What is the filesystem type of your external storage ?

TtuxX avatar Oct 12 '21 16:10 TtuxX

Seems nice to me!

I'm thinking about drawing a draft of interface in an editor to get an idea about how could hierarchical sorting be implemented in a simple manner for the end-user. However, having at the same time "File upload date", "File creation date" and "File modification date" hierarchical cumulative sorting will be complex to implement I think.

Also, the main issue to me is that creation date is not something applicable to Linux-related systems and might not make sense on the majority of Nextcloud instances. What is the filesystem type of your external storage ?

imagine having ONE date column that can be toggled through created/modified/added ascending/descending - saves visual space, but gives all info.

Only thing that frustrates idea this is the paged loading. Imagine trying to get to something many pages down lol scroll, wait load, scroll, wait, load, scroll. Need a 'display all' tick box someday. Or do dynamic loading when 2/3rds is reached to load just before needed.

etyrnal avatar Oct 12 '21 18:10 etyrnal

Imagine trying to get to something many pages down lol scroll, wait load, scroll, wait, load, scroll.

Are you experiencing issues like this in some of the current views of the Music app? I know that the Files app works like this and it makes browsing large folders a painful experience. But the lazy loading logic of the Music app is fully custom made and technically totally different. It should enable you to jump to any part of the view and see the content without much waiting. For me, the system works still pretty well still with the test library containing 60'000+ tracks: If I click any alphabet on the right edge of the All tracks view, the view moves directly to the correct point in the list and shows the tracks in less than a second.

paulijar avatar Oct 12 '21 20:10 paulijar

i only see two 'folders' M and U. Music and Unknown. Because my collection of music is on several drives, and i only have this music app pointed to one folder full of 6000 unsorted tracks. All of my favorites. I don't acquire music by album, or artists. I just add music normally one track at a time, and only what i like. I never liked when music apps 'organize' my media. i don't care if the media app catalogs is, and makes a neat database of everything it discovers, but i do not let media apps touch my media in a r/w environment, only read only. I've had media app destroy my stuff in the past, so now i do not allow media apps to have r/w access. I actually have 4 nfs mounts mounted on the nc server under /mnt/all_music/ in four subfolders to try to access it all, but since music app doesn't like the deeper hierarchy, i can only point it to my unsorted folder.

So, in that one folder of 6000 tracks, it loads and scrolls pretty fast.

etyrnal avatar Oct 12 '21 22:10 etyrnal

@etyrnal We are being side-tracked from the OP now but here's a few comments to your latest message:

  • Your tracks are probably shown under Music or Unknown because the metadata extraction has failed and the Music app doesn't know the actual artists. I hadn't tested any read-only external storages before, but I now did, ~~and I can see that the metadata cannot be extracted. There's no good reason for this, as the Music app anyway tries to open the files in read-only mode. This may be a bug in Nextcloud, in Music, or in the getID3 library used by Music for the metadata extraction.~~ Edit: Forget what I said, I accidentally tested wrong folder and saw another, known bug, but couldn't yet reproduce extraction problems on read-only external storage.
  • Music app never tries to write to any of the audio files. You are free to be skeptical and of course there's a theoretical chance that anything might happen because of some weird bug. But I would be very surprised if Music would destroy your files. Every now and then, someone requests adding the metadata editing to the app but I'm quite hesitant to do that, just because something could go horribly wrong.
  • Deepness of the directory hierarchy shouldn't be any kind of issue for the Music app. But Music app can see only files which have been indexed by the host cloud. This doesn't work automatically for the external storages but using the occ command files:scan would probably help.

paulijar avatar Oct 13 '21 20:10 paulijar

@etyrnal We are being side-tracked from the OP now but here's a few comments to your latest message:

  • Your tracks are probably shown under Music or Unknown because the metadata extraction has failed and the Music app doesn't know the actual artists. I hadn't tested any read-only external storages before, but I now did, ~and I can see that the metadata cannot be extracted. There's no good reason for this, as the Music app anyway tries to open the files in read-only mode. This may be a bug in Nextcloud, in Music, or in the getID3 library used by Music for the metadata extraction.~ Edit: Forget what I said, I accidentally tested wrong folder and saw another, known bug, but couldn't yet reproduce extraction problems on read-only external storage.
  • Music app never tries to write to any of the audio files. You are free to be skeptical and of course there's a theoretical chance that anything might happen because of some weird bug. But I would be very surprised if Music would destroy your files. Every now and then, someone requests adding the metadata editing to the app but I'm quite hesitant to do that, just because something could go horribly wrong.
  • Deepness of the directory hierarchy shouldn't be any kind of issue for the Music app. But Music app can see only files which have been indexed by the host cloud. This doesn't work automatically for the external storages but using the occ command files:scan would probably help.

Thank you. I only mentioned the scenario/setup as it relates to the question what date would be the most logical reference as far as sorting by 'date added'. In my mind it makes the most sense for the date sorting to be by the file creation date, but that's not always the order they were added to the database.

etyrnal avatar Oct 13 '21 21:10 etyrnal

For the record, the Advanced search feature added in Music v1.11.0 supports also this use case, among many others. The simplest way is to search for tracks with an empty query and select the ordering of results "by time added". But if you want to, you may also search for tracks added before and/or after some given date(s).

image

paulijar avatar Jun 23 '24 20:06 paulijar