Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: entne on April 02, 2019, 07:24:14 AM

Title: Show albums sorted by (displayed) year
Post by: entne on April 02, 2019, 07:24:14 AM

I found two four/five years old threads on this, saying that it isn't possible in rockbox.

http://forums.rockbox.org/index.php/topic,51105.msg235916.html?PHPSESSID=vfe44b8d952k931ma9m2pmt9i4#msg235916

http://forums.rockbox.org/index.php/topic,9570.0.html

Now in 2019 I just want to humbly ask, if anything changed on that topic. I am a complete newbie concerning any custom configs in rockbox, so be kind.  :)

My request is the same as in the threads above, I would like to have something like this in the database:

artists -> band xx -> "(2019) album", the year taken from the tag of the album files. This this would be instead of the alphabetical order of the pure album names. Imho this would be a large improvement for a discographywise chronological view.

Thanks a lot for your answers!

Title: Re: Show albums sorted by (displayed) year
Post by: chris_s on April 07, 2019, 07:43:32 AM
It's possible but it requires a bit of handiwork. See my answer (by chris_s2) on IRC, specifically the second part that refers to  this patch (https://www.rockbox.org/tracker/task/8051): https://www.rockbox.org/irc/log-20190313

If you're interested and aren't able to do it yourself, I may be able to compile you a version that includes this functionality next weekend. In that case, let me know which device you need it for.
Title: Re: Show albums sorted by (displayed) year
Post by: entne on April 18, 2019, 03:43:01 PM

H320  :)
Title: Re: Show albums sorted by (displayed) year
Post by: SubSonix on July 30, 2021, 11:08:59 PM
It's possible but it requires a bit of handiwork. See my answer (by chris_s2) on IRC, specifically the second part that refers to  this patch (https://www.rockbox.org/tracker/task/8051): https://www.rockbox.org/irc/log-20190313

If you're interested and aren't able to do it yourself, I may be able to compile you a version that includes this functionality next weekend. In that case, let me know which device you need it for.

I know this is a slight necro, but I'm hoping that you could help me implement this for my iPod Classic please?

iPod classic 160 GB (Late 2009)
Navigation: Click Wheel
Capacity: 160 GB
Model number and date introduced: A1238: September 2009
Title: Re: Show albums sorted by (displayed) year
Post by: chris_s on August 02, 2021, 10:57:27 AM
It's possible but it requires a bit of handiwork. See my answer (by chris_s2) on IRC, specifically the second part that refers to  this patch (https://www.rockbox.org/tracker/task/8051): https://www.rockbox.org/irc/log-20190313

If you're interested and aren't able to do it yourself, I may be able to compile you a version that includes this functionality next weekend. In that case, let me know which device you need it for.

I know this is a slight necro, but I'm hoping that you could help me implement this for my iPod Classic please?

iPod classic 160 GB (Late 2009)
Navigation: Click Wheel
Capacity: 160 GB
Model number and date introduced: A1238: September 2009
I should be able to, but may not get to it before the weekend. Feel free to drop me a PM in case I forget.

Personally, I've actually stopped using the yearalbum patch and have ended up simply copying the album title, prepended by the album year, to the Comments tag of each my audio files, which achieves pretty much the same thing and doesn't require you to modify the Rockbox source. You only have to add something like this to your tagnavi.config:

Code: [Select]
"Albums by year" -> albumartist -> comment -> title = "fmt_title"
Title: Re: Show albums sorted by (displayed) year
Post by: SubSonix on August 03, 2021, 02:49:20 AM
No rush :)

Honestly, everything you just said is over my head lol

And I've got tens of thousands of songs, so that would take a long time :P
Title: Re: Show albums sorted by (displayed) year
Post by: Duceboia on August 03, 2021, 02:21:38 PM
With Foobar2000 and masstagger tagging thousands of songs will take less time that you would think.
Title: Re: Show albums sorted by (displayed) year
Post by: chris_s on August 24, 2021, 07:07:58 AM
ugh, I'm extremely sorry for the long delay, but I've finally built you a development version with the patch applied (also includes g#3731):

https://www.dropbox.com/s/wdnj2yacfwzguqs/rockbox-full-ipodclassic.zip?dl=0 (for iPod classic)

The patch is available on Gerrit (https://gerrit.rockbox.org) now (g#3732), for anyone who wants to manually apply it.

Please let me know if you encounter any problems. It should work fine since it isn't doing anything complicated, but as I said, I don't personally use the patch anymore so I only took a cursory look at it on the latest dev version to confirm that it still works.

It may be obvious, but one thing to keep in mind is that albums with songs from different years will be split up into multiple entries (which was the main reason I chose to eventually go a different route (https://forums.rockbox.org/index.php/topic,13191.msg248073.html#msg248073) for my own usage)
Title: Re: Show albums sorted by (displayed) year
Post by: SubSonix on August 24, 2021, 09:17:59 AM
Thank you so much! :)
Title: Re: Show albums sorted by (displayed) year
Post by: Buzkill on August 26, 2021, 12:21:31 AM
Quote

The patch is available on Gerrit (https://gerrit.rockbox.org) now (g#3732), for anyone who wants to manually apply it.


THUMBS UP 8)  Any chance could get one compiled for ipod 4g greyscale? no rush. worked great for my classic
Title: Re: Show albums sorted by (displayed) year
Post by: chris_s on August 26, 2021, 08:50:55 AM
Quote

The patch is available on Gerrit (https://gerrit.rockbox.org) now (g#3732), for anyone who wants to manually apply it.


THUMBS UP 8)  Any chance could get one compiled for ipod 4g greyscale? no rush. worked great for my classic
:) Sure, no problem:

https://www.dropbox.com/s/e82zcmujcw6ff43/rockbox-full-ipod4g.zip?dl=0
Title: Re: Show albums sorted by (displayed) year
Post by: Buzkill on August 26, 2021, 09:14:38 AM
Quote

 :) Sure, no problem:

https://www.dropbox.com/s/e82zcmujcw6ff43/rockbox-full-ipod4g.zip?dl=0

Legit! Thank you very much  8)
Title: Re: Show albums sorted by (displayed) year
Post by: Buzkill on August 27, 2021, 01:35:53 AM

 :) Sure, no problem:


So not sure if it's just me, but last night i noticed that my 4G-grayscale is now crashing right after i set my SLEEP TIMER to on.(1h20m just for troubleshooting) after installing this patch_Swapped back and had no issues...So fist thought was maybe my theme, but even the stock theme crashed. Next came trying my classic as it was working before but i had not tried the Sleep timer function . AND low and behold it crashed as well.... So not sure whats going on there, but just thought id let you know that it's crashing both my pods, and see if you guys get similar results.
Title: Potentally Solved
Post by: Buzkill on August 27, 2021, 05:28:53 AM
So i think I found a VERY simple and elegent solution to this problem. No compiling or patches of any sort to source code- just need to modify a few lines in tagnavi.config, and sacrifice your "comments" tag on your mp3's

First, for all your songs, use mp3Tag to put in the 'comments tag' -> "YEAR - ALBUM"

Then in tagnavi.config you're going to want to replace a few instances of 'album' with 'comment' where it makes sense to do so....

# Define the search sub menu
%menu_start "search" "Search by..."
"Artist" -> artist ? artist ~ "" -> comment -> title = "fmt_title"
"Album" -> album ? album ~ "" -> title = "fmt_title"
"Title" -> title = "fmt_title" ? title ~ ""
"Genre" -> genre ? genre ~ "" -> artist -> comment -> title = "fmt_title"
"Composer" -> composer ? composer ~ "" -> comment -> title = "fmt_title"
"Album Artist" -> albumartist ? albumartist ~ "" -> comment -> title = "fmt_title"
"Album by year" -> album ? year = "" -> title = "fmt_title"
"Artist between years" -> artist ? year >= "" & year <= "" -> comment -> title = "fmt_title"
"Album between years" -> comment ? year >= "" & year <= "" -> title = "fmt_title"
"Filename" -> filename ? filename ~ ""
"Score" -> title = "fmt_score" ? autoscore > ""
"User Rating" -> title = "fmt_rating" ? rating > ""
...

# Define the title of the main menu
%menu_start "main" "Database"
"Artist"   -> artist   -> comment -> title = "fmt_title"
"Album Artist"   -> albumartist   -> comment  -> title = "fmt_title"
"Album"    -> album    -> title = "fmt_title"
"Genre"    -> genre    -> artist -> comment -> title = "fmt_title"
"Composer" -> composer -> comment -> title = "fmt_title"
"Track"    -> title = "fmt_alphanum_title"
"Year"     -> year ? year > "0" -> artist -> album -> title = "fmt_title"
....

By leaving the 'album' tag in the "Album" and "YEAR" section, this makes it so that while browsing individual artists, composers or album artists- their albums will show up in chronological order and will be displayed with dates first, BUT while browsing by albums or years it will list all albums alphabetically with no Dates shown, just like it does currently- same goes for the WPS screen as it's still using the 'albums' tag.

This also fixes the issue where only one album  was showing up for years where the artist released multiple albums in said year.
Title: Re: Potentally Solved
Post by: chris_s on August 27, 2021, 06:17:51 AM
So i think I found a VERY simple and elegent solution to this problem. No compiling or patches of any sort to source code- just need to modify a few lines in tagnavi.config, and sacrifice your "comments" tag on your mp3's

First, for all your songs, use mp3Tag to put in the 'comments tag' -> "YEAR - ALBUM"

Then in tagnavi.config you're going to want to replace a few instances of 'album' with 'comment' where it makes sense to do so....

# Define the title of the main menu
%menu_start "main" "Database"
"Artist"   -> artist   -> comment -> title = "fmt_title"
"Album Artist"   -> albumartist   -> comment  -> title = "fmt_title"
"Album"    -> album    -> title = "fmt_title"
"Genre"    -> genre    -> artist -> comment -> title = "fmt_title"
"Composer" -> composer -> comment -> title = "fmt_title"
"Track"    -> title = "fmt_alphanum_title"
"Year"     -> year ? year > "0" -> artist -> album -> title = "fmt_title"
....

By leaving the 'album' tag in the "Album" and "YEAR" section, this makes it so that while browsing individual artists, composers or album artists- their albums will show up in chronological order and will be displayed with dates first, BUT while browsing by albums or years it will list all albums alphabetically with no Dates shown, just like it does currently- same goes for the WPS screen as it's still using the 'albums' tag.

This also fixes the issue where only one album  was showing up for years where the artist released multiple albums in said year.
Yeah, "abusing" the comments tag in that way is what I mentioned a bit further up and is currently my preferred solution as well.


 :) Sure, no problem:


So not sure if it's just me, but last night i noticed that my 4G-grayscale is now crashing right after i set my SLEEP TIMER to on.(1h20m just for troubleshooting) after installing this patch_Swapped back and had no issues...So fist thought was maybe my theme, but even the stock theme crashed. Next came trying my classic as it was working before but i had not tried the Sleep timer function . AND low and behold it crashed as well.... So not sure whats going on there, but just thought id let you know that it's crashing both my pods, and see if you guys get similar results.
No idea what's going on there. I'm unable to reproduce that on an iPod 4G.
Title: Re: Show albums sorted by (displayed) year
Post by: Buzkill on August 27, 2021, 06:44:14 AM
Very interesting! seems an odd glitch in the matrix.  ;D