Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: ofboir on December 20, 2010, 09:02:15 AM

Title: Need help with tagnavi.config file
Post by: ofboir on December 20, 2010, 09:02:15 AM
Hello

I recently discovered the tagnavi.config file, and tried to make my own tagnavi_custom.config. What I want to do, is to have in the database, under each artist, all the albums presented with the year (and the albums will then be sorted chronologically).

Here's my custom file (I put it entirely, we never know) :
Code: [Select]
#! rockbox/tagbrowser/2.0

# FORMATS
%format "fmt_title"       "%d.%02d. %s - %02d:%02d" discnum tracknum title Lm Ls ? discnum > "0"
%format "fmt_title"       "%02d. %s - %02d:%02d" tracknum title Lm Ls ? tracknum > "0"
%format "fmt_title"       "%s - %02d:%02d" title Lm Ls
%format "fmt_album" "%04d. %s" year album ? year > "0"
%format "fmt_album" "%s" album

# MAIN MENU
%menu_start "mainperso" "Database"
"Artist"   -> artist   -> year = "fmt_album" -> title = "fmt_title"
"Album"    -> album    -> title = "fmt_title"
"Genre"    -> genre    -> artist -> album -> title = "fmt_title"
"Composer" -> composer -> album -> title = "fmt_title"
"Year"     -> year ? year > "0" -> artist -> album -> title = "fmt_title"

# ROOT MENU
%root_menu "mainperso"

It works, but there is just one exception : when an artist has 2 different albums in the same year (it happens !). Here's an example with 3 albums of you-know-who (or maybe not), who released 2 albums in 1969 (what a prolific year !). His album list should look like this :
Quote
1959. Kind of Blue
1969. Filles de Kilimanjaro
1969. In A Silent Way
But like I did it, only the first 2 appear, and the tracks from "In A Silent Way" appear under "Filles de Kilimanjaro".

Clearly, the problem is with my "Artist" filter, in :
Code: [Select]
year = "fmt_album"Actually, I'm not sure to understand what the "year =" is for. Since I want to select tracks according to year and album, I tried to replace it with "album =".

When I did that, I got this :
Quote
Filles de Kilimanjaro
In A Silent Way
Kind of Blue
Back to the beginning ...

Any idea or, at least, does anyone know what this identifier before the = means ?

Thanks !

(And if it helps in any way, I precise that I use a Fuze v2)
Title: Re: Need help with tagnavi.config file
Post by: ofboir on December 22, 2010, 08:11:26 AM
Anyone ?

I'll try to reformulate into a simpler question ;D :

When I make a filter, with something like title = "fmt_title", why do I need to put title = ? What information does it give ? Why "fmt_title" only is not sufficient ? (since the fmt_title format already defines the information to display)

Thank you
Title: Re: Need help with tagnavi.config file
Post by: torne on December 22, 2010, 01:09:52 PM
The part before the equals sign determines what to filter on, i.e. which things to have in the list, not how they are formatted. Specifying the filter as 'track' means it displays all tracks individually, as opposed to grouping by artist or album or another field.
Title: Re: Need help with tagnavi.config file
Post by: ofboir on December 22, 2010, 02:34:56 PM
OK I see

But then, if I put album = "fmt_album" in my exemple above, that should do it, it will group by albums, but display the string also containing the year.
So why does it skip the year in that case ?

Thanks for your answer !
Title: Re: Need help with tagnavi.config file
Post by: torne on December 22, 2010, 03:31:39 PM
Because things that aren't tracks don't (reliably) have other metadata fields, unfortunately. Albums don't actually *exist* as a thing, only the individual files do, so there's nowhere for it to retrieve the year from. The non-track menu entries are artificial constructions which only have the properties implied by the filters which precede them.
Title: Solved
Post by: Buzkill on August 27, 2021, 05:33:27 AM
Putting this here for people searching


https://forums.rockbox.org/index.php/topic,52779.msg249145.html#msg249145