Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: rADo on September 24, 2006, 06:56:34 AM

Title: tagnavi.config v2.0 syntax
Post by: rADo on September 24, 2006, 06:56:34 AM
Having upgraded my iPod 60G to latest CVS code, I have found that tagcache does not work anymore. Only later I realized that my heavily modified tagnavi.config now need a different syntax.

Is there any documentation that describes v2.0 tagnavi.config format in detail?

Thanks.

This is what I am using right now:
Code: [Select]
#! rockbox/tagbrowser/2.0
# ^ Version header must be the first line of every file

# Define the search sub menu
%menu_start "search" "Search by..."
"Artist" -> artist ? artist ~ "" -> album -> title = "%02d. %s" tracknum title
"Album" -> album ? album ~ "" -> title = "%02d. %s" tracknum title
"Title" -> title ? title ~ ""
"Filename" -> filename ? filename ~ ""
"Score" -> title = "(%3d) %s" autoscore title ? autoscore > ""

# ^ An empy line ends the (sub)menu

# Define the title of the main menu
%menu_start "main" "Browse by..."
"Artist"   -> artist   -> album  -> title = "%02d. %s" tracknum title
"Album"    -> album    -> title = "%02d. %s" tracknum title
"Genre"    -> genre    -> artist -> album -> title = "%02d. %s" tracknum title
"Year"     -> year ? year > "1000" & year < "2008" -> artist -> album -> title = "%02d. %s" tracknum title
"Search..." ==> "search"
"Most played tracks" -> title = "(%3d) %s" playcount title %sort = "inverse" %limit = "100" ? playcount > "0"
"Never played tracks" -> artist ? playcount == "0" -> album -> title = "%02d. %s" tracknum title
"Best tracks" -> artist ? playcount > "1" & autoscore > "85" -> album -> title = "%02d. %s (%3d)" tracknum title autoscore
"List played tracks" -> title = "(%3d/%d) %s" autoscore playcount title ? playcount > "0"
"Artist @ A" -> artist ? artist ^ "A"  -> album -> title = "%02d. %s" tracknum title
"Artist @ B" -> artist ? artist ^ "B"  -> album -> title = "%02d. %s" tracknum title
"Artist @ C" -> artist ? artist ^ "C"  -> album -> title = "%02d. %s" tracknum title
"Artist @ D" -> artist ? artist ^ "D"  -> album -> title = "%02d. %s" tracknum title
"Artist @ E" -> artist ? artist ^ "E"  -> album -> title = "%02d. %s" tracknum title
"Artist @ F" -> artist ? artist ^ "F"  -> album -> title = "%02d. %s" tracknum title
"Artist @ G" -> artist ? artist ^ "G"  -> album -> title = "%02d. %s" tracknum title
"Artist @ H" -> artist ? artist ^ "H"  -> album -> title = "%02d. %s" tracknum title
"Artist @ I" -> artist ? artist ^ "I"  -> album -> title = "%02d. %s" tracknum title
"Artist @ J" -> artist ? artist ^ "J"  -> album -> title = "%02d. %s" tracknum title
"Artist @ K" -> artist ? artist ^ "K"  -> album -> title = "%02d. %s" tracknum title
"Artist @ L" -> artist ? artist ^ "L"  -> album -> title = "%02d. %s" tracknum title
"Artist @ M" -> artist ? artist ^ "M"  -> album -> title = "%02d. %s" tracknum title
"Artist @ N" -> artist ? artist ^ "N"  -> album -> title = "%02d. %s" tracknum title
"Artist @ O" -> artist ? artist ^ "O"  -> album -> title = "%02d. %s" tracknum title
"Artist @ P" -> artist ? artist ^ "P"  -> album -> title = "%02d. %s" tracknum title
"Artist @ Q" -> artist ? artist ^ "Q"  -> album -> title = "%02d. %s" tracknum title
"Artist @ R" -> artist ? artist ^ "R"  -> album -> title = "%02d. %s" tracknum title
"Artist @ S" -> artist ? artist ^ "S"  -> album -> title = "%02d. %s" tracknum title
"Artist @ T" -> artist ? artist ^ "T"  -> album -> title = "%02d. %s" tracknum title
"Artist @ U" -> artist ? artist ^ "U"  -> album -> title = "%02d. %s" tracknum title
"Artist @ V" -> artist ? artist ^ "V"  -> album -> title = "%02d. %s" tracknum title
"Artist @ W" -> artist ? artist ^ "W"  -> album -> title = "%02d. %s" tracknum title
"Artist @ X" -> artist ? artist ^ "X"  -> album -> title = "%02d. %s" tracknum title
"Artist @ Y" -> artist ? artist ^ "Y"  -> album -> title = "%02d. %s" tracknum title
"Artist @ Z" -> artist ? artist ^ "Z"  -> album -> title = "%02d. %s" tracknum title

# And finally set main menu as our root menu
%root_menu "main"
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on September 24, 2006, 10:59:32 AM
Quote
Only later I realized that my heavily modified tagnavi.config

'"heavily"? Don't you mean "slightly" ? ;)  ;)

Just kidding - thanks for sharing.

I have attached my work in progress.

Quote
now need a different syntax.

Yes, I am not to fond of the "-->", but the submenus are a blessing.

Quote
Is there any documentation that describes v2.0 tagnavi.config format in detail?

When I am having more time next month I was planning to update the wiki (unless someone beats me to it).

[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: rADo on September 24, 2006, 11:03:52 AM
'"heavily"? Don't you mean "slightly" ? ;)  ;)

Yes, this one is very light mod :) Previous one was way better, but I have no docs for v2.0 syntax, that is why I am asking for it..

Btw, I like your menu. Thank you!
Title: Re: tagnavi.config v2.0 syntax
Post by: rADo on September 24, 2006, 11:30:43 AM
Ok, I am happy with this file:

Code: [Select]
#! rockbox/tagbrowser/2.0
# ^ Version header must be the first line of every file

# search sub menu
%menu_start "search" "Search by..."
"Artist" -> artist ? artist ~ "" -> album -> title = "%02d. %s" tracknum title
"Album" -> album ? album ~ "" -> title = "%02d. %s" tracknum title
"Title" -> title ? title ~ ""
"Filename" -> filename ? filename ~ ""
"Score" -> title = "(%3d) %s" autoscore title ? autoscore > ""

# artists sub menu
%menu_start "byartist" "Artists A-Z"
"Artist @ A" -> artist ? artist ^ "A"  -> album -> title = "%02d. %s" tracknum title
"Artist @ B" -> artist ? artist ^ "B"  -> album -> title = "%02d. %s" tracknum title
"Artist @ C" -> artist ? artist ^ "C"  -> album -> title = "%02d. %s" tracknum title
"Artist @ D" -> artist ? artist ^ "D"  -> album -> title = "%02d. %s" tracknum title
"Artist @ E" -> artist ? artist ^ "E"  -> album -> title = "%02d. %s" tracknum title
"Artist @ F" -> artist ? artist ^ "F"  -> album -> title = "%02d. %s" tracknum title
"Artist @ G" -> artist ? artist ^ "G"  -> album -> title = "%02d. %s" tracknum title
"Artist @ H" -> artist ? artist ^ "H"  -> album -> title = "%02d. %s" tracknum title
"Artist @ I" -> artist ? artist ^ "I"  -> album -> title = "%02d. %s" tracknum title
"Artist @ J" -> artist ? artist ^ "J"  -> album -> title = "%02d. %s" tracknum title
"Artist @ K" -> artist ? artist ^ "K"  -> album -> title = "%02d. %s" tracknum title
"Artist @ L" -> artist ? artist ^ "L"  -> album -> title = "%02d. %s" tracknum title
"Artist @ M" -> artist ? artist ^ "M"  -> album -> title = "%02d. %s" tracknum title
"Artist @ N" -> artist ? artist ^ "N"  -> album -> title = "%02d. %s" tracknum title
"Artist @ O" -> artist ? artist ^ "O"  -> album -> title = "%02d. %s" tracknum title
"Artist @ P" -> artist ? artist ^ "P"  -> album -> title = "%02d. %s" tracknum title
"Artist @ Q" -> artist ? artist ^ "Q"  -> album -> title = "%02d. %s" tracknum title
"Artist @ R" -> artist ? artist ^ "R"  -> album -> title = "%02d. %s" tracknum title
"Artist @ S" -> artist ? artist ^ "S"  -> album -> title = "%02d. %s" tracknum title
"Artist @ T" -> artist ? artist ^ "T"  -> album -> title = "%02d. %s" tracknum title
"Artist @ U" -> artist ? artist ^ "U"  -> album -> title = "%02d. %s" tracknum title
"Artist @ V" -> artist ? artist ^ "V"  -> album -> title = "%02d. %s" tracknum title
"Artist @ W" -> artist ? artist ^ "W"  -> album -> title = "%02d. %s" tracknum title
"Artist @ X" -> artist ? artist ^ "X"  -> album -> title = "%02d. %s" tracknum title
"Artist @ Y" -> artist ? artist ^ "Y"  -> album -> title = "%02d. %s" tracknum title
"Artist @ Z" -> artist ? artist ^ "Z"  -> album -> title = "%02d. %s" tracknum title

# albums sub menu
%menu_start "byalbum" "Albums A-Z"
"Album @ A" -> album ? album ^ "A"  -> title = "%02d. %s" tracknum title
"Album @ B" -> album ? album ^ "B"  -> title = "%02d. %s" tracknum title
"Album @ C" -> album ? album ^ "C"  -> title = "%02d. %s" tracknum title
"Album @ D" -> album ? album ^ "D"  -> title = "%02d. %s" tracknum title
"Album @ E" -> album ? album ^ "E"  -> title = "%02d. %s" tracknum title
"Album @ F" -> album ? album ^ "F"  -> title = "%02d. %s" tracknum title
"Album @ G" -> album ? album ^ "G"  -> title = "%02d. %s" tracknum title
"Album @ H" -> album ? album ^ "H"  -> title = "%02d. %s" tracknum title
"Album @ I" -> album ? album ^ "I"  -> title = "%02d. %s" tracknum title
"Album @ J" -> album ? album ^ "J"  -> title = "%02d. %s" tracknum title
"Album @ K" -> album ? album ^ "K"  -> title = "%02d. %s" tracknum title
"Album @ L" -> album ? album ^ "L"  -> title = "%02d. %s" tracknum title
"Album @ M" -> album ? album ^ "M"  -> title = "%02d. %s" tracknum title
"Album @ N" -> album ? album ^ "N"  -> title = "%02d. %s" tracknum title
"Album @ O" -> album ? album ^ "O"  -> title = "%02d. %s" tracknum title
"Album @ P" -> album ? album ^ "P"  -> title = "%02d. %s" tracknum title
"Album @ Q" -> album ? album ^ "Q"  -> title = "%02d. %s" tracknum title
"Album @ R" -> album ? album ^ "R"  -> title = "%02d. %s" tracknum title
"Album @ S" -> album ? album ^ "S"  -> title = "%02d. %s" tracknum title
"Album @ T" -> album ? album ^ "T"  -> title = "%02d. %s" tracknum title
"Album @ U" -> album ? album ^ "U"  -> title = "%02d. %s" tracknum title
"Album @ V" -> album ? album ^ "V"  -> title = "%02d. %s" tracknum title
"Album @ W" -> album ? album ^ "W"  -> title = "%02d. %s" tracknum title
"Album @ X" -> album ? album ^ "X"  -> title = "%02d. %s" tracknum title
"Album @ Y" -> album ? album ^ "Y"  -> title = "%02d. %s" tracknum title
"Album @ Z" -> album ? album ^ "Z"  -> title = "%02d. %s" tracknum title

# titles sub menu
%menu_start "bytitle" "Titles A-Z"
"Title @ A" -> title ? title ^ "A"
"Title @ B" -> title ? title ^ "B"
"Title @ C" -> title ? title ^ "C"
"Title @ D" -> title ? title ^ "D"
"Title @ E" -> title ? title ^ "E"
"Title @ F" -> title ? title ^ "F"
"Title @ G" -> title ? title ^ "G"
"Title @ H" -> title ? title ^ "H"
"Title @ I" -> title ? title ^ "I"
"Title @ J" -> title ? title ^ "J"
"Title @ K" -> title ? title ^ "K"
"Title @ L" -> title ? title ^ "L"
"Title @ M" -> title ? title ^ "M"
"Title @ N" -> title ? title ^ "N"
"Title @ O" -> title ? title ^ "O"
"Title @ P" -> title ? title ^ "P"
"Title @ Q" -> title ? title ^ "Q"
"Title @ R" -> title ? title ^ "R"
"Title @ S" -> title ? title ^ "S"
"Title @ T" -> title ? title ^ "T"
"Title @ U" -> title ? title ^ "U"
"Title @ V" -> title ? title ^ "V"
"Title @ W" -> title ? title ^ "W"
"Title @ X" -> title ? title ^ "X"
"Title @ Y" -> title ? title ^ "Y"
"Title @ Z" -> title ? title ^ "Z"

# decades sub menu
%menu_start "bydecades" "Decades"
""-> artist ? year == "0"                    -> album -> title = "%02d %s" tracknum title
"sixties"   -> artist ? year >= "1960" & year < "1970" -> album -> title = "%02d %s" tracknum title
"seventies" -> artist ? year >= "1970" & year < "1980" -> album -> title = "%02d %s" tracknum title
"eighties"  -> artist ? year >= "1980" & year < "1990" -> album -> title = "%02d %s" tracknum title
"nineties"  -> artist ? year >= "1990" & year < "2000" -> album -> title = "%02d %s" tracknum title
"2000ties"  -> artist ? year >= "2000" & year < "2010" -> album -> title = "%02d %s" tracknum title

# main menu
%menu_start "main" "Browse by..."
"Artists A-Z" ==> "byartist"
"Albums A-Z" ==> "byalbum"
"Titles A-Z" ==> "bytitle"
"Genres"    -> genre    -> artist -> album -> title = "%02d. %s" tracknum title
"Decades" ==> "bydecades"
"All Artists"   -> artist   -> album  -> title = "%02d. %s" tracknum title
"All Albums"    -> album    -> title = "%02d. %s" tracknum title
"Browse by Year"     -> year ? year > "1000" & year < "2008" -> artist -> album -> title = "%02d. %s" tracknum title
"Most played tracks" -> title = "(%3d) %s" playcount title %sort = "inverse" %limit = "100" ? playcount > "0"
"Never played tracks" -> artist ? playcount == "0" -> album -> title = "%02d. %s" tracknum title
"Best tracks" -> artist ? playcount > "1" & autoscore > "85" -> album -> title = "%02d. %s (%3d)" tracknum title autoscore
"List played tracks" -> title = "(%3d/%d) %s" autoscore playcount title ? playcount > "0"
"Search..." ==> "search"

# And finally set main menu as our root menu
%root_menu "main"
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on September 25, 2006, 10:19:41 AM
...I have attached my work in progress...

Just FYI my x5 doesn't boot with your tagnavi.config.

Don't know why yet...


edit; it does boot, but doesn't show me any interface... just freezes at the logotype.
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on September 25, 2006, 02:40:19 PM
...I have attached my work in progress...

Just FYI my x5 doesn't boot with your tagnavi.config.

Don't know why yet...


edit; it does boot, but doesn't show me any interface... just freezes at the logotype.

I suspect you are running an old build? Slasheri fixed the hang if there are more then 8 menus.

21 Sep 17:16   Miika Pekkarinen   apps/tagtree.c 1.41
apps/tagtree.h 1.11    Increased maximum number of menus to 16 and avoiding a crash.
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on September 25, 2006, 02:52:25 PM
Haha.. So true!

For the first time since may i've NOT updated my x5 to bleeding edge every day (was partying in denmark during weekend instead) and i was running cvs: 060920-2007... Now i'm running 060925-1955 - and i'm delighted by your way of thinking and organizing menues - thank you. :)
Title: Re: tagnavi.config v2.0 syntax
Post by: nugget on September 27, 2006, 12:20:23 AM
does  your tagnavi also include numbers as i can only see letters (but im prob blind  :P)
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on September 28, 2006, 07:22:18 AM
Well, I'm really struggling getting this to work and would really appreciate some help...

I using build CVS-060927-0216 on an H120 with the default version of tagnavi.config

It contains this line:
Code: [Select]
"Custom view..."  ==> "custom"
However, this option does not appear in my Tag Cache menu. Thinking it might be smart enough to display only if the 'custom' menu exists, I created the following simple tagnavi_custom.config file (using Notepad, saving as UTF-8) from roolku's example above:
Code: [Select]
#! rockbox/tagbrowser/2.0
# roolku v0.1

%menu_start "artist_initial" "artist initial"
"A"   -> artist ? artist ^ "A" -> album  -> title = "%02d %s" tracknum title
"B"   -> artist ? artist ^ "B" -> album  -> title = "%02d %s" tracknum title
"C"   -> artist ? artist ^ "C" -> album  -> title = "%02d %s" tracknum title
"X"   -> artist ? artist ^ "X" -> album  -> title = "%02d %s" tracknum title
"Y"   -> artist ? artist ^ "Y" -> album  -> title = "%02d %s" tracknum title
"Z"   -> artist ? artist ^ "Z" -> album  -> title = "%02d %s" tracknum title

%menu_start "other" "other"
"find file"    -> title ? filename ~ ""
"ogg"          -> album ? filename $ ".ogg" -> title = "%02d %s" tracknum title
"not mp3/ogg"  -> album ? filename !$ ".ogg" & filename !$ ".mp3"-> title = "%02d %s" tracknum title
"low Bitrate"  -> title = "%03d %s" bitrate title %sort = "inverse" ? bitrate < "128"
"high Bitrate" -> title = "%03d %s" bitrate title ? bitrate > "256"
"bad year"     -> title = "%04d %s" year title ? year > "0" & year < "1960"

%menu_start "custom" "Custom"
"Artist by initial"  ==> "artist_initial"
"other"  ==> "other"

# EOF

Still no joy. I just cannot get a custom menu to display at all. I've modified previous versions of tagnavi.config without problems, so I don't think it's a file format issue. I have also modified the new default tagnavi.config and can see the changes I've made having an effect on the menu.

It's just that the custom menu line will not work for me  >:(

Can anyone shed some light on this?
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on September 28, 2006, 08:10:21 AM
# And finally set custom menu as our root menu
%root_menu "custom"



?


stole it from example far above
Title: Re: tagnavi.config v2.0 syntax
Post by: bluebrother on September 28, 2006, 08:21:24 AM
I just tried your example. Works for me, but:
when saving the file as utf-8 with BOM it doesn't work. You need to make sure to save without a BOM. Apart from that, as long as your file doesn't include characters outside of the ASCII set utf-8 is identical to ASCII, so there's no need to save it as utf-8. (Edit: the lower 127 characters of ASCII that is.)

Just remove the BOM, that worked fine for me. Notepad is really ugly when it comes to utf-8 files. I suggest using a different editor which can handle utf-8 better (I used vim and Crimson Editor).
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on September 28, 2006, 08:39:03 AM
# And finally set custom menu as our root menu
%root_menu "custom"

I took that option off roolku's file, because, AFAICT, that option completely replaces the default Tag Cache menu with the custom one. ATM all I am trying to do is add a custom menu to the existing list. Once I get that working I'll branch out into more esoteric stuff. I'm just frustrated that it doesn't seem to work as simply as it appears it should do.

I just tried your example. Works for me, but:
when saving the file as utf-8 with BOM it doesn't work. You need to make sure to save without a BOM. Apart from that, as long as your file doesn't include characters outside of the ASCII set utf-8 is identical to ASCII, so there's no need to save it as utf-8. (Edit: the lower 127 characters of ASCII that is.)

Just remove the BOM, that worked fine for me. Notepad is really ugly when it comes to utf-8 files. I suggest using a different editor which can handle utf-8 better (I used vim and Crimson Editor).

So, using the magic of Wikipedia, I now know what BOM is, but not yet how to remove it :(  Is there an easy way to do this?

I am also aware that Notepad is not the best text editor out there, but my previous dabblings in this area have always worked OK, so I made the assumption that it would be OK this time. I'll try Notepad++ or Notepad2. EDIT: Well I got it working by copying my config text into a copy of the default config file and re-saving it. I presume I got the BOM issue by copying and pasting from the forum into a new Notepad file? Not something I've come across before, but hey, you need to learn something new every day...

@ roolku - your config rocks!

As for the UTF-8, I used that because I thought, (probably incorrectly) that it fixed the LF/CR vs LF-only issue.
Title: Re: tagnavi.config v2.0 syntax
Post by: bluebrother on September 28, 2006, 10:06:17 AM
To remove the BOM you need to get a decent editor. In my case, I used Crimson Editor in which I can change the document encoding (Document / Encoding Type / UTF-8 w/o BOM). Of course you can also use a hex-editor and delete the first three bytes ;-) The problem is (afaik) that windows notepad simply always adds a BOM if a file is saved as utf-8. But if you don't need utf-8 you can simply save files as ASCII (which also works with notepad).
The CR/LF issue is something completely different.
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on September 28, 2006, 10:13:51 AM
To remove the BOM you need to get a decent editor. In my case, I used Crimson Editor in which I can change the document encoding (Document / Encoding Type / UTF-8 w/o BOM). Of course you can also use a hex-editor and delete the first three bytes ;-) The problem is (afaik) that windows notepad simply always adds a BOM if a file is saved as utf-8. But if you don't need utf-8 you can simply save files as ASCII (which also works with notepad).
The CR/LF issue is something completely different.

Our posts crossed in the ether and you can see I have managed to get it working now, but thanks for those explanations, you have been very helpful :)
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on September 28, 2006, 12:55:29 PM
@ roolku - your config rocks!

Thanks, I have attached a slightly improved version (v0.2). Also I have some more ideas, but no time to try them. :(


[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on September 28, 2006, 01:02:53 PM
Thanks, I have attached a slightly improved version (v0.2). Also I have some more ideas, but no time to try them. :(
Well, now I've got it working, I'll be working up my own version, but I'll keep the artist_initial listing, as that really gives me what I was looking for.
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on October 04, 2006, 09:06:40 AM
What patch are you talking about in your menue?
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on October 04, 2006, 06:16:04 PM
What patch are you talking about in your menue?
This one: http://www.rockbox.org/tracker/task/6098
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on October 24, 2006, 09:05:21 AM
I'm having a hard time understanding the logic...

Since we got the "Basic format declarations" some of your menues disappear.
I've experimented some... replacing most of your format stuff with the basic declaration constants instead... It works..
But what baffels me is that if i use
title = "fmt_mostplayed"
it works but not if i copy the exact string from basic format declarations and use that as
title = "(%3d) %s" playcount title %sort = "inverse" %limit = "100"
wich.. in my world would be exactly the same thing but the menue option doesn't show up.

Should i add my own format constants in tagnavi_custom.conf?
Why didn't i think of that until now?

I've done some sort of update to your config... It works for me... I think...

(edit added " around fmt_mostplayed...)

[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on October 24, 2006, 09:29:33 AM
#i wish this would work...
%format "fmt_title_artist"       "%s (%s)" title artist
So do I, but according to this table (http://www.rockbox.org/twiki/bin/view/Main/TagCache#Supported_Tags) artist is not supported for formatting :(

As for your other questions, I've not played around with the formatting string, but you're right that if it does not appear, then it's because Rockbox chokes on the syntax...

I believe the theory is that you put all your personal changes in the ..._custom.cfg file, as then they are not lost if the default one changes for any reason.

Also, I have found replacing the Artist = "T" line with the following very useful to reduce the number of artist results:
Code: [Select]
"T"   -> artist ? artist ^ "T" & artist !^ "The " -> album  -> title = "%02d %s" tracknum title
"The..."   -> artist ? artist ^ "The " -> album  -> title = "%02d %s" tracknum title
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on October 24, 2006, 09:33:09 AM
Clever! (I'll nick that aswell)
But, again, i can't use formats unless they are constants...

I must be doing something wrong?
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on October 24, 2006, 10:44:00 AM
But, again, i can't use formats unless they are constants...

I must be doing something wrong?

With Slasheri's introduction of conditional formats you now have to declare all format strings explicitly. :( I'll go and update the wiki...

It was a bit of a messy change, but my current file is attached for reference.

EDIT: wiki updated

[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: Slasher on October 24, 2006, 01:56:08 PM
#i wish this would work...
%format "fmt_title_artist"       "%s (%s)" title artist

Now that should work. :)
Title: Re: tagnavi.config v2.0 syntax
Post by: PaulJam on October 24, 2006, 03:34:49 PM
Hi

I have a little problem with the following entrys in my tagnavi_custom.config

Code: [Select]
%format "fmt_leastplayed"   "%d %s (by %s)" playcount title artist %limit = "100"and
Code: [Select]
"Am wenigsten gespielte Titel" -> title = "fmt_leastplayed"
When i select the entry I get a splash with "Dir Buffer is Full!" and the listing is empty.
I have already increased the max files in dir limit to 10.000 and restarted, but it didn't help.
If i remove the '%limit = "100"' it works, but then the listing wouldn't make sense anymore.

Does someone have an idea why this isn't working?

The whole tagnavi_custom.config file is in the attachement.

[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on October 25, 2006, 04:04:38 AM
#i wish this would work...
%format "fmt_title_artist"       "%s (%s)" title artist

Now that should work. :)

Greatness, it does work indeed!
Thank you.

Btw, I can't redefine a format constant. It seems to work like a first hit filter not a variable assign. Just for info if someone is scratching their head.

PaulJam; I see the same error as you do... Even in the uisim where i've only got 30-40 files. Is it a bug?

roolku;
The wiki doesn't seem to be updated?
http://www.rockbox.org/twiki/bin/view/Main/TagCache#tagnavi_config_v2_0_Syntax
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on October 25, 2006, 06:14:36 AM
Btw, I can't redefine a format constant. It seems to work like a first hit filter not a variable assign. Just for info if someone is scratching their head.

Not sure what you mean by re-define. You can have multiple definitions with different conditions. TagTree will use the first one where the condition is true (see also Wiki and Slasheri's example).

Quote
PaulJam; I see the same error as you do... Even in the uisim where i've only got 30-40 files. Is it a bug?

Looking at Slasheri's example tagnavi, the error can be suppressed by having the condition  
? playcount > "0"
at the menu item line. I don't know if this just reduces the result set to a managable size (that would contradict xlarges observation of it happening with 30-40 files) or if the error is caused by something else. Maybe Slasheri has some insight.

Quote
roolku;
The wiki doesn't seem to be updated?
http://www.rockbox.org/twiki/bin/view/Main/TagCache#tagnavi_config_v2_0_Syntax

Patience, patience. The 'multiple string tag' change came only after my last edit. Table now fixed (I am unsure about filename, length and playtime). Also, please feel free to edit the page yourself. It is a wiki after all. :)
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on October 25, 2006, 07:40:35 AM
Aah. That's clever.

In the example we have two "fmt_title";
%format "fmt_title" "%02d. %s" tracknum title ? tracknum > "0"
%format "fmt_title" "%s" title

Wich means that if a track hasn't got tracknum or it's not bigger than 0 it shows just title.

Thanks for pointing that out!

(Yes, it is a wiki after all... :) I've got an account, not authorized yet though)
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on October 28, 2006, 05:48:14 AM
#i wish this would work...
%format "fmt_title_artist"       "%s (%s)" title artist

Now that should work. :)

FANTASTIC ;D

That really does it for me, Rockbox now officially does everything I want it to do..

I have a perfect Tag Cache start-up screen, with my cool and clear browser list, I have Runtime DB-based browsing options and I have the smart BevelledRBX (http://www.rockbox.org/twiki/bin/view/Main/WpsIriverH100#beveledRBX_by_MathieuStempell) WPS, courtesy of dma (http://forums.rockbox.org/index.php?action=profile;u=1574)

Thanks to Miika Pekkarinen and roolku for writing?/committing most of the Tag Cache stuff and for keeping the Tag Cache syntax Wiki up to date respectively and to all the Rockbox developers for an outstanding product.


[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: Adam on October 31, 2006, 12:41:54 AM
I must be doing something rather stupid, I can't get any of the tagnavi_custom.config files to work with my bleeding edge build.  I had used one of the earlier ones, around when this thread started, has something broken?
I end up with either the default menu, or no menu (if I run dos2unix on the tagnavi_custom.config).
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on October 31, 2006, 02:38:47 AM
Why don't you attach your tagnavi_custom.config and let us have a look?
Title: Re: tagnavi.config v2.0 syntax
Post by: Adam on October 31, 2006, 02:41:52 AM
I've been using exactly the ones posted by roolku in this thread, all of them...
Title: Re: tagnavi.config v2.0 syntax
Post by: Slasher on October 31, 2006, 03:45:52 AM
For some reason those files have one extra empty line after every real line (maybe some windows issue), so you need to remove those extra empty lines (but be sure not to remove too much).
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on October 31, 2006, 05:44:56 AM
I must be doing something rather stupid, I can't get any of the tagnavi_custom.config files to work with my bleeding edge build.  I had used one of the earlier ones, around when this thread started, has something broken?
I end up with either the default menu, or no menu (if I run dos2unix on the tagnavi_custom.config).

The syntax has changed several times, so only v0.4 (posting 21) would work. The files do have cr-lf (DOS) linefeeds, but work fine for me regardless. It should simply be a matter of removing the ".txt" from the end of the file and putting it into the .rockbox folder.
Title: Re: tagnavi.config v2.0 syntax
Post by: Adam on October 31, 2006, 11:09:45 AM
For some reason those files have one extra empty line after every real line (maybe some windows issue), so you need to remove those extra empty lines (but be sure not to remove too much).
Ah, thank you, that seems to have solved it.  I suppose the problem with this was that a blank line signifies the end of a menu, so all the menus ended immediately.
Title: Re: tagnavi.config v2.0 syntax
Post by: lenny on November 01, 2006, 02:06:02 AM
Can one have a format tag modify a level that is not the last one? For instance:
Code: [Select]
%format "fmt_strip_trk"        "%02d%s" tracknum title %strip = "2"

%format "fmt_year_album" "%s %s" year album

%menu_start "artist_initial" "artist initial"
"A"   -> artist ? artist ^ "A" -> album = "fmt_year_album"  -> title = "fmt_strip_trk"

etc...
I also tried this:
Code: [Select]
"C"   -> artist ? artist ^ "C" -> year album  -> title = "fmt_strip_trk"when it is all done, the fmt_strip_trk works, but the frmt_year_album has no effect. Is it possible? Am I doing it the right way?
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on November 01, 2006, 03:35:01 AM
I don't think this is possible, sadly.

I would like to be able to list all albums in a similar way to yours but, reading the Wiki, it appears that the formatting only applies to the Title attribute and that the Title must be the last level displayed...

Quote from: http://www.rockbox.org/twiki/bin/view/Main/TagCache#tagnavi_config_v2_0_Syntax
Code: [Select]

influences the display of the title list (last level in the browser)

Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on November 01, 2006, 08:10:47 AM
I don't think this is possible, sadly.

I would like something similar as well, but unfortunately the way you describe has a conceptual problem. You assume that all tracks from the same album have the same year tag, which may not be the case. For maximum flexibility we would really want an equivalent to the SQL 'group by'. But I can't see how this can be implemented efficiently for tagcache.
Title: Re: tagnavi.config v2.0 syntax
Post by: athatai on November 01, 2006, 06:21:40 PM
Hi all,

Thanks so much for the tagnavi_config file. I find it very useful. I have a question regarding the format of the tag.

 I would like to preserve the order of songs as I listen a lot to live albums. For example, Dave Matthews Live in NY is a 3 CD set. When I choose Dave Matthews and select  the playlist is sorted by "Title".

If  that is not possible,  does " allow customization through tagnavi syntax?  I can then display soemthing like Album-Track Number-Title to preserve the order.

thanks
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on November 02, 2006, 07:54:03 AM
Thanks so much for the tagnavi_config file. I find it very useful. I have a question regarding the format of the tag.

I am afraid, is always sorted by title.

Not always what one wants, but I can't think of a good solution on how to implement it.

It would be good if auto-change directory worked for the virtual folders in tag cache.
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on November 02, 2006, 08:32:05 AM
I would like to preserve the order of songs as I listen a lot to live albums. For example, Dave Matthews Live in NY is a 3 CD set. When I choose Dave Matthews and select < All_Tracks >  the playlist is sorted by "Title".

If  that is not possible,  does "< All_Tracks > allow customization through tagnavi syntax?  I can then display soemthing like Album-Track Number-Title to preserve the order.

roolku is correct, the < All Tracks > format is unmodifiable, but you should be able to do this:

%format "fmt_long" "%s-%02d-%-%s" album tracknum title
"Multi-album Artist" -> artist -> title = "fmt_long"

I've tested this on my H120 and it works a treat :)
Title: Re: tagnavi.config v2.0 syntax
Post by: athatai on November 02, 2006, 10:36:34 AM
Bascule,

Thanks so much. Just what I wanted.

Title: Re: tagnavi.config v2.0 syntax
Post by: evilnick on November 14, 2006, 12:06:23 PM
Hi All,

Just wondering if there is a way yet of asking tagcache for all the artists either beginning with A or The A... in one line. I've tried:

Code: [Select]
"A"   -> artist ? artist ^ "A" & artist ^ "The A" -> album  -> title = "fmt_strip_trk"
But this means: Artist that begins with "A" AND "The A" so returns no results

and also

Code: [Select]
"A"   -> artist ? artist ^ "A" | artist ^ "The A" -> album  -> title = "fmt_strip_trk"
Which *should* mean: Artist that begins with "A" OR "The A" but this doesn't seem to work properly either.

Any advice?
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on November 14, 2006, 01:22:21 PM
Just wondering if there is a way yet of asking tagcache for all the artists either beginning with A or The A... in one line.

Not that I can think of. One could attempt something along the lines of:

"A" -> artist ? artist !^ "B" & artist !^ "C" & artist !^ "D" & artist !^ "E" & .... & artist !^ "The B" & artist !^ "The C" & artist !^ "The D" & artist !^ "The E" & .... -> title

but would run into the limit of 32 fairly quickly.

The following patch modifies the one_of (@) so that it only compares the initial portion of the string, so it would be possible to use something like:

"A" -> artist ?  artist @ "A|The A" -> title = "fmt_the"

But the sorting would be so that all the "The" artists end up at the bottom. Also you would need to take care of the letter T.

"T" -> artist ?  artist ^ "T" & artist !^ "The A" & artist !^ "The B" & artist !^ "The C" -> title = "fmt_the"

All very messy. It really needs a solution outside tag cache that also takes care of the other articles like a, an, der, die, das, le, la, les etc.


[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: Brownsound on December 10, 2006, 09:39:17 PM
Just updated to the bleeding edge build and none of these custom tagnavi's seem to work for me, I tried V0.4 and all I get is a blank screen, any ideas? if I use the one in the first post, i see the menu but only the title selection displays anything. I have a 5G with tonight bleeding edge. Thanks.

Edit:
I just tried the fix to delete some blank lines  ??? it didn't do anything, in all honesty though there's a good chance I did something wrong. I also tried clearing the settings, still no dice.
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on December 11, 2006, 03:24:57 AM
A lot of changes have happened to the syntax since this thread was started. Try the attached one to see if it will work (it should do!).

Download and rename it to exactly tagnavi_custom.config which will require stripping the .txt and maybe any other stuff windows adds to the filename while downloading. Also watch out that Windows does not hide the extension to fool you ;)

Copy the file to your .rockbox folder on your player and reboot.

EDIT: config file re-uploaded as it was broken (BOM (http://en.wikipedia.org/wiki/Byte_Order_Mark) removed). Use the second one in the list, as I cannot delete my original attachment :(

[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: kwaanens on January 04, 2007, 09:47:43 AM
Sadly, I can't seem to get this to work.
Looking at the player lists now, it's the same as it's always been. I know I put the right file in the right place. (The original tagnavi.config should stay in place, right?) I tried updating from 18. december daily build, to I also tried reverting to defualt settings, and see if that changed anything.
Re-initialising the player now, to see if that changes anything :(


- Ketil
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on January 04, 2007, 09:49:20 AM
This is my file, probably not as complete and nifty as bascule's but still, it works with a build from yesterday.



[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: kwaanens on January 04, 2007, 10:19:42 AM
Thanks!
Yours seems to work.
Hope the other one can be fixed, so I can chech out which one I'd like to use.

- Ketil
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on January 04, 2007, 10:23:43 AM
It's based on roolku's file from a while ago... But i've mucked about a bit with i since then...
I suggest you do the same :)
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on January 04, 2007, 10:25:46 AM
Thanks!
Yours seems to work.
Hope the other one can be fixed, so I can chech out which one I'd like to use.

- Ketil

I have no idea why mine did not work, but the content is from the same base as xlarge's one, so really it would be sufficient to look at mine in Notepad/your choice of text editor, get the hang of the syntax and then (re)write your own!

EDIT: This has been fixed - see my edited post (http://forums.rockbox.org/index.php?topic=6661.msg59882#msg59882)
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on January 28, 2007, 05:44:57 PM
For anyone who is interested, I've updated the Wiki regarding tagnavi syntax with some of my recent findings... (http://www.rockbox.org/twiki/bin/view/Main/DataBase#tagnavi_config_v2_0_Syntax)
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on January 30, 2007, 11:49:59 AM
Good job!
Title: Re: tagnavi.config v2.0 syntax
Post by: Nutopia on February 05, 2007, 05:31:05 PM
I just wanted to say that this was the final thing that i wanted out of rockbox that I too miss from RIO KARMA. I posted earlier today on the iAudio board about this - they informed me it was already done, and I found it here. Worked like a charm!! Rockbox is amazing. You guys rock.

 ;D
Title: Re: tagnavi.config v2.0 syntax
Post by: woodensoul on February 07, 2007, 11:27:06 PM
One small change I'd like to see to bascule's tagnavi_custom.config is the menu item to list all artists (and albums) in one screen as before in addition to the option to browse by first letter.  This would make it easier to view all artists (or albums) without having to enter each letter of the alphabet.  I'm sure this is possible but I haven't read through the entire wiki entry yet.  At the risk of testing Llorean's patience, does anyone have a quick suggestion to achieve what I want?
Title: Re: tagnavi.config v2.0 syntax
Post by: Llorean on February 08, 2007, 12:50:47 AM
I'd imagine putting a line with
Code: [Select]
"All Artists"   -> artist -> album  -> title = "f_browse"
before
Code: [Select]
"A"   -> artist ? artist ^ "A" -> album  -> title = "f_browse"
Would make the first entry do what you want.
Title: Re: tagnavi.config v2.0 syntax
Post by: woodensoul on February 08, 2007, 12:11:45 PM
Worked like a charm. :) Thanks!  Another question while I have your attention: where is the play count information stored?  I update often and find that the play count gets reset and I'm not sure if it's because I'm deleting the file that stores the information or if it happens for some other reason.
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on February 09, 2007, 03:26:18 AM
It's stored in the Database's *.tcd files in normal operation and shouldn't get overwritten by rockbox version updates or a database update, but will get lost if you initialise the database.

If you wish to preserve playcounts over re-initialisations, follow the manual instructions here under Export Modifications:

http://download.rockbox.org/manual/rockbox-h100/rockbox-buildch4.html#x7-370004.2.3
Title: Re: tagnavi.config v2.0 syntax
Post by: dip on February 09, 2007, 03:33:15 AM
I tried to use %strip to strip the tracknumbers when displaying titles (which should be sorted by tracknumbers), but it does not strip anything. I use

%format "fmt_title" "%02d. %s" tracknum title strip = "3" ? tracknum > "0"

Is that format incorrect or does strip not work? Any help would be appreciated.

Dieter
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on February 09, 2007, 05:01:20 AM
If you have copied exactly what you used, then the problem is you missed the % from %strip...

I tried:

%format "fmt_title" "%02d. %s" tracknum title %strip = "3" ? tracknum > "0"

in the simulator and it worked perfectly...

To look good, though, you need to strip 4 characters (2 for the number, 1 for the '.' and 1 for the 'space'
Title: Re: tagnavi.config v2.0 syntax
Post by: dip on February 09, 2007, 06:53:47 AM
Sorry, I did of course use %strip and I also tried 4 characters. I am quit sure that it did not work for me but I will again test it this evening.
Title: Re: tagnavi.config v2.0 syntax
Post by: dip on February 09, 2007, 08:05:36 AM
I tried:

%format "fmt_title" "%02d. %s" tracknum title %strip = "3" ? tracknum > "0"

in the simulator and it worked perfectly...
I tried the above  in the simulator(copy and pasted it just to be sure not to miss any character) but it does not remove the leading tracknumber in the title list. Is there any option which must be additionally set?

I amended the format string to be sure that this string is used (included the constant word "test" and the artist tag), rebuilt the database and the word "test" and the artist were shown but still also the leading tracknumber.

Any ideas... ???
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on February 09, 2007, 09:15:30 AM
I tried:

%format "fmt_title" "%02d. %s" tracknum title %strip = "3" ? tracknum > "0"

in the simulator and it worked perfectly...
I tried the above  in the simulator(copy and pasted it just to be sure not to miss any character) but it does not remove the leading tracknumber in the title list. Is there any option which must be additionally set?

It is a limitation (or bug?) that all conditional format strings with the same name must use the same %strip value. So I assume you have another fmt_title in your tagnavi.config file. The workaround is to use %strip="3" in all your format strings, but have some meaningless dummy characters to help you with the sorting.

For example in a similar situation I use:

%format "fmt_chrono_cond_year" "ZZZZ%02d%s" tracknum title %strip = "6" ? year = "0"
%format "fmt_chrono_cond_year" "%04d%02d%04d %s" year tracknum year title %strip = "6"
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on February 09, 2007, 09:21:21 AM
There is no other option required.

It's a long shot, but do your actual title tags contain the tracknumber?

Scratch that...

I think the problem may be that the default tagnavi.config file contains more than one 'fmt_title' entry as per this snippet from the Wiki:

Quote
It is possible to use the same fmt_identifier with different definitions. The first line where the condition is true is applied, so it is suggested to use an unconditional line as a "catch all" at the end.

Change the line to:

%format "my_fmt" "%02d. %s" tracknum title %strip = "3" ? tracknum > "0"

and then change the format used in the query:

"All Artists"   -> artist -> album  -> title = "my_fmt"

Bother - roolku beat me to it :P

EDIT: But they are slightly different solutions to the same problem. Who goes? You decide!
Title: Re: tagnavi.config v2.0 syntax
Post by: dip on February 09, 2007, 09:43:49 AM
@roolku and bascule:

I had my own format definitions but I had included the %strip parameter only in one of them. So roolku you are right, as soon as I included the %strip in the other one it works! Thanks a lot, I never had found that.


One further question to the rockbox experts  ;D

When I select the format string is not used for displaying the title. Is that a bug or can I change that?
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on February 09, 2007, 09:56:35 AM
@roolku:
The reason that I use the tracknumber but strip it is that I want have the tracks sorted by tracknumber but no to see the tracknumber.

Yes, I realised that - hence my edit. ;)

When I select  < All tracks >  the format string is not used for displaying the title. Is that a bug or can I change that?

I think it is intentional as it often doesn't make sense to use it. (i.e. why would you want to listen to the first tracks of all your albums first then followed by all the second tracks etc. But I agree in some situations it would be nice.
Title: Re: tagnavi.config v2.0 syntax
Post by: dip on February 09, 2007, 10:05:40 AM
When I select  < All tracks >  the format string is not used for displaying the title. Is that a bug or can I change that?

I think it is intentional as it often doesn't make sense to use it. (i.e. why would you want to listen to the first tracks of all your albums first then followed by all the second tracks etc. But I agree in some situations it would be nice.

Here I forgot the sorting. Of course sorting by tracknumbers would not be senseful in this case. What I wanted was the same kind of formatting of the displayed track title (I always use e.g. "title (artist)") to distinguish between different versions of the same song from different artists. I have a lot of jazz standards everybody is singing. Without the artist name I get a long list of e.g. "Summertime"s without being able to distuinguish between them.

It seems to be a problem that for sorting and formatting the same string is used.
Title: Re: tagnavi.config v2.0 syntax
Post by: dip on February 11, 2007, 02:31:55 PM
Wouldn't it be possible to use the format string ONLY for displaying the track titles but not for sorting them when selecting "All Tracks"? In this way one could on the one hand avoid that e.g. all first tracks of all albums are listed first but on the other hand the displayed track titles still include all information (e.g. the artist in parenthesis) and have the desired format.
Title: Re: tagnavi.config v2.0 syntax
Post by: jsn5406 on March 14, 2007, 08:18:55 PM
Hello..
I would like to know how (if possible) to increase the menu limit to say 20...or even better...30 since
I use many similar submenus but on different (fixed) folders.

Thank you
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on March 15, 2007, 04:26:28 AM
I don't understand at all what you mean.

AFAIK there is no limit on the ?number/size? of menus, but I really don't know what you are trying to achieve.

Please give more details.
Title: Re: tagnavi.config v2.0 syntax
Post by: jsn5406 on March 15, 2007, 10:59:59 AM
Okay..

I have 7 music folders...and each of these I wish to create custom menus for

Under these menus I intend to include custom searches (approximately 3 per folder)..

I'm ending up with 20 search routines which are quite long (about 18 of which are custom A-Z artist and album searches) but when I put all of these into a tagnavi_custom file, it sort of crashes when I load the database...i.e. it tends to load the very first menu (at the top) in the tagnavi_custom file.

I tried experimenting by removing search routines..I got it to work nicely with about 8 menus but as soon as I put in another menu, it gives problems again..

I'm running the latest jbuild since I use jblack glass themes.

If you need any more information..please let me know
Title: Re: tagnavi.config v2.0 syntax
Post by: xlarge on March 15, 2007, 11:05:14 AM
Please attach that whole file so we can have a look at it.
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on March 15, 2007, 11:27:54 AM
Ok, well I do know there seems to be limit to the total size of tagnavi information that is loaded and I have also come up against missing menus and strange behaviour because the last few lines of the file have not been loaded. Slasher (http://forums.rockbox.org/index.php?action=profile;u=1908) on the forums would probably know exactly what the limit is...

However, what's more interesting is why you have 7 separate music folders and want separate (but apparently similar) database navigation functionality for each...

I'm sure with a bit of effort (and knowing exactly what differentiation you wish to have between them) that a solution can be found without busting the filesize limit ;)

Please attach that whole file so we can have a look at it.
Yes, do that, but as an attachment, please, not as text - I don't want the forum to get broken as well :P
Title: Re: tagnavi.config v2.0 syntax
Post by: jsn5406 on March 15, 2007, 12:52:12 PM
Okay I have included my tagnavi with color codes for easier viewing in wordpad (as an rtf)...since its kind of long...

You will be able to see the 7 folders I have, which are basically named for their genre...but each folder contains alot of songs (singles has over 4000)....perhaps its bad form...i don't know lol...but it seems to work for me

There is a slight problem in that each folder is unique...and in some cases it is simply impractical to do a specific search in a folder due to the mass unavailability of that specific tag. This is why you may find album/artist searches in one folder, and artist/title/year searches in another folder.

Also, I have another folder solely with albums but these are nicely arranged where each album has its own folder...so I prefer to use the file browser on this folder rather than the database. So far this is the only folder I can get to use efficiently with Rockbox.

I did read that, promisingly, there is a way to edit tagtree.h to allow more of tagnavi to load...but I am less that a noob when it comes to coding and compiling...so I should think this is a last resort

Let me know what you think

[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on March 15, 2007, 01:22:45 PM
That's certainly an interesting file ;D

I would say that your best bet would be to tag your files somehow with the category types that you have currently split out into directories.

The obvious one would be genre, but you may already have genres filled, in which case you could use the newly-available comment field.

Once this is done, then the searches you have could be generic (i.e., only one of each), but pre-filtered by the category or using the category as a conditional.

E.g.,

"Artist by Category" comment -> artist -> title = "blah"

Or, for the more complicated A-Z stuff, a separate menu per category

E.g.,
"Dancehall A-Z" ==> "dancehall"

%menu_start "dancehall" "Dancehall A-Z"
"A"   -> artist ? artist ^ "A" & comment = "dancehall" -> album  -> title = "f_browse"
"B"   -> artist ? artist ^ "B" & comment = "dancehall" -> album  -> title = "f_browse"

Somehow you need to trim down your unfeasibly large tagnavi file and this seems the easiest way.
Title: Re: tagnavi.config v2.0 syntax
Post by: jsn5406 on March 15, 2007, 03:08:44 PM
I understand your suggestion and it is quite useful..

the problem is that I would like all of my searches (artist/title/album) to be alphabetical, and this means i'll still have the long versions of each procedure..

It would have been cool if I could have a line like:

%menu_start "test" "Browse Artists"
"Artist by Directory" -> comment ==> "alpha"

and then this would call a generic alphabetical menu...but for now I shall have to find other ways of condensing the file...

do you suppose referencing a procedure from another with a switch would be implemented any time soon?

alternatively I have found that I can have one generic A-Z menu which will request the comment such as in this line:

"A" -> comment -> artist ? artist ^ "a" -> title =...
"B" -> comment -> artist ? artist ^ "b" -> title =...

but this would mean choosing the comment after every letter selection and this is neither efficient nor aesthetically pleasing...

need another cup of coffee...
Title: Re: tagnavi.config v2.0 syntax
Post by: jsn5406 on March 15, 2007, 09:55:10 PM
just to update I used the alternative I discovered earlier..

The file works now...it's just that I have to select the folder after I select the Letter (as you can see from the attachment)...

I must say it is much cleaner..and I had room to include your modded tagnavi stuff like mood search...thanks btw..





[attachment deleted by admin, too old]
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on March 16, 2007, 03:44:09 AM
It would have been cool if I could have a line like:

%menu_start "test" "Browse Artists"
"Artist by Directory" -> comment ==> "alpha"
I've always wanted to do this, it would very useful. Unfortunately, there's probably only roolku or slasher who could actually implement it :(

alternatively I have found that I can have one generic A-Z menu which will request the comment such as in this line:

"A" -> comment -> artist ? artist ^ "a" -> title =...
"B" -> comment -> artist ? artist ^ "b" -> title =...
That's a cool solution for your particular situation; glad it worked out for you :D
Title: Re: tagnavi.config v2.0 syntax
Post by: Xezzy on March 22, 2008, 08:51:05 AM
Hi!
Recently I'm playing with tagnavi and I cant force one thing.
I want to create something like this:

Code: [Select]
%format "fmt_titlenest" "%02d. %s" tracknum title
%format "fmt_artistalbum" "%s [%s]" artist album

"albums" -> album = "fmt_artistalbum" -> title = "fmt_titlenest"

But offcourse I cant because u can use fmt_identifier only with title, thats sad :( is there any workaround for this query? If not, are you planing to include fmt_identifier for 'album' or any other string?
Title: Re: tagnavi.config v2.0 syntax
Post by: KindOfBlues71 on March 25, 2008, 01:53:19 PM
Xezzy-

Change your format identifiers to f_titlenest and f_artistalbum and they should work.  I can't explain why, but I know from using bascule's and my own custom tagnavi file that using "f_" rather than "fmt_" works...

-KindOfBlues71
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on March 25, 2008, 02:19:19 PM
The prefix fmt_ is just a convention and is not used an any way, so you can omit it or replace it by f_ or whatever. I suspect the problem KindOfBlues71 refers to (f_ works, but fmt_ doesn't) is that the database silently truncates or ignores overly long strings, but I'll have to look at the code to confirm.

Regarding Xezzy's query - you are right, you can only use supported tags (and not format strings) as filters. I can't think of a suitably flexible workaround.
Title: Re: tagnavi.config v2.0 syntax
Post by: KindOfBlues71 on March 25, 2008, 02:57:02 PM
Sorry for the incorrect advice Xezzy, I should've paid more attention to the actual code you posted rather than replying based on your post below it.  I shall now repeat the following 50 times: Shut the mouth and open the eyes...

@roolku (aka My Hero For Creating the YearAlbum Patch, or MHFCYAP for short)- Please post what you find out about overly-long strings, I'd be interested to know.  I've been creating my own custom tagnavi file based off of bascule's example file in the Database wiki and have hit a few bumps...

-KindOfBlues71
Title: Re: tagnavi.config v2.0 syntax
Post by: Xezzy on March 28, 2008, 09:17:03 AM
Np. I knew it was only convention :)
I've posted my question, but after about 5 mins I found in wiki thats creating strings is possible for single tracks only, so Ive edited my post and answered the question myself lol. Anyway possibilty of mapping album or artist by other fields would be nice.
thx for reply!
Title: order by artist & title and display "<artist> - <title>"
Post by: fallout33 on June 16, 2008, 03:11:55 PM
version: r17727

When I try to display all tracks in the form "<artist> - <title>" they are sorted by the title and not by the entire artist-title string.

Code: [Select]
#! rockbox/tagbrowser/2.0

%format "fmt_artist_title" "%s - %s" artist title

%menu_start "main" "Database"
"Artist - Title" -> title = "fmt_artist_title"


I expected that the above code would order the list first by artist and then by title.


Quote from: help
<formatting> determines how the tracks are displayed and sorted (!)

http://www.rockbox.org/twiki/bin/view/Main/DataBase


Do you know a solution for this problem?
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on June 19, 2008, 04:17:32 AM
Well, I've confirmed your findings, it does the same for me, but it is certainly not what I would expect.

I'll have a look into it.


EDIT:

This only happens when no filter is used. It appears that if the query goes straight to 'title', then the format string is ignored.

This works as expected:
"All tracks artist_title" -> genre -> title = "fmt_artist_title"

This does not:
"All tracks artist_title" -> title = "fmt_artist_title"

Bug report raised. (http://www.rockbox.org/tracker/task/9104)
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on July 01, 2008, 05:14:06 PM

This only happens when no filter is used. It appears that if the query goes straight to 'title', then the format string is ignored.


Should be fixed now - thanks for reporting.
Title: Re: tagnavi.config v2.0 syntax
Post by: CruX on September 07, 2008, 07:44:07 AM
[r18435]
Hey guys,

I'm trying to configure my Rockbox(using an Sandisk Sansa e260) for a few hours now.
My 'tagnavi.config':
Code: [Select]
#! rockbox/tagbrowser/2.0
# ^ Version header must be the first line of every file

# Tag Browser configuration file, do not edit as changes will be lost!
# Instead, you can modify "/.rockbox/tagnavi_custom.config" which will never
# get overwritten automatically.

# Basic format declarations
%format "fmt_title"       "%d.%02d. %s" discnum tracknum title ? 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"       "%02d. %s - %s[%02d:%02d]" tracknum artist title Lm Ls ? albumartist = "Various Artists"
%format "fmt_album"       "%02d. %s[%02d:%02d]" tracknum title Lm Ls
%format "fmt_mostplayed" "%2d|%3d %s (%s)" playcount autoscore title artist %sort = "inverse" %limit = "100"
%format "fmt_lastplayed"  "%06d%s - %s" lastplayed artist title %sort = "inverse" %limit = "99" %strip = "6"
%format "fmt_forgotten"  "%06d%s - %s" lastplayed artist title %limit = "99" %strip = "6"
%format "fmt_best_tracks" "%02d. %s (%3d)" tracknum title autoscore
%format "fmt_score"       "(%3d) %s-%s" autoscore title artist
%format "fmt_rating"       "(%2d) %s-%s" rating title artist %sort = "inverse"

# Include our custom menu
%include "/.rockbox/tagnavi_custom.config"

#
# === Begin of "A to Z" sub menus
#

# Define the A to Z Artist sub menu
[...]
# ^ An empy line ends the menu

# Define the A to Z album sub menu
[...]

# Define the A to Z track sub menu
%menu_start "custom_track" "Track A to Z"
[...]

# Define the A to Z sub menu
%menu_start "a2z" "A to Z..."
"Artists" ==> "custom_artist"
"Albums" ==> "custom_album"
"Tracks" ==> "custom_track"

#
# === Begin of "Search by..." sub menu
#

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

# Define the "same as current" sub menu
%menu_start "same" "Same as current"
"Directory" -> title ? filename ^ "#directory#"
"Title" -> title = "fmt_title" ? title = "#title#"
"Artist" -> album ? artist = "#artist#" -> title  = "fmt_title"
"Album" -> title = "fmt_title" ? album = "#album#"
"Composer" -> title = "fmt_title" ? composer = "#composer#"

# Define the runtime sub menu
%menu_start "runtime" "Play history"
"Most played (Plays|Score)" -> title = "fmt_mostplayed" ? playcount > "0"
"Recently played tracks" -> title = "fmt_lastplayed" ? playcount > "0"
"Never played tracks" -> artist ? playcount == "0" -> album -> title = "fmt_title"
"Favourite artists" -> artist ? playcount > "3" & autoscore > "85" -> album -> title = "fmt_best_tracks"
"Favourite albums" -> album ? playcount > "3" & autoscore > "85" -> title = "fmt_best_tracks"
"Recent favourites" -> title = "fmt_lastplayed" ? playcount > "3" & autoscore > "85"
"New favourites" -> artist ? playcount <= "3" & autoscore > "85" -> album -> title = "fmt_best_tracks"
"Forgotten favourites" -> title = "fmt_forgotten" ? playcount > "3" & autoscore > "85"

#
# === Begin of main menu
#

# Define the title of the main menu
%menu_start "main" "Database"
"Artist"   -> artist   -> album  -> title = "fmt_title"
#"Album Artist"   -> albumartist   -> album  -> title = "fmt_title"
"Album"    -> album    -> title = "fmt_album"
#"Genre"    -> genre    -> artist -> album -> title = "fmt_title"
#"Composer" -> composer -> album -> title = "fmt_title"
"Track"    -> title
#"Year"     -> year ? year > "0" -> artist -> album -> title = "fmt_title"
"User Rating" -> rating -> title = "fmt_title"
"Recently Added" -> album ? entryage < "4" & commitid > "0" -> title = "fmt_title"
"A to Z..." ==> "a2z"
"History..." ==> "runtime"
"Same as current..." ==> "same"
"Search..." ==> "search"
"Custom view..."  ==> "custom"

# And finally set main menu as our root menu
%root_menu "main"
(i deleted a few parts to save space)
My main problem is the
Code: [Select]
%format "fmt_album"       "%02d. %s - %s[%02d:%02d]" tracknum artist title Lm Ls ? albumartist = "Various Artists"
%format "fmt_album"       "%02d. %s[%02d:%02d]" tracknum title Lm Ls
part because i have a few 'Various Artists' compilations and also a few albums with only one artist. Rockbox does not display the tags correctly, every album in my database is displayed the same, it just doesn't matter if the album is tagged 'Various Artists" or not, it always uses the first line.
The random thing comes now: if i comment out the 'fmt_album' lines and add another line like this
Code: [Select]
%format "fmt_album"       "%s" albumartist it displays all the albumartist-tags correctly.
I tried using the 'BAND', 'ALBUMARTIST' and 'ALBUM ARTIST' Tag, but it wont work.
Another random thing is if i comment out the 'fmt_album' lines and add 2 lines like this:
Code: [Select]
%format "fmt_album"       "%02d. %s - %s[%02d:%02d]" tracknum artist title Lm Ls ? artist = "Neophyte"
%format "fmt_album"       "%02d. %s[%02d:%02d]" tracknum title Lm Ls
everything works like a charm...[Neophyte is one of my artists]

thanks in advance
CruX


Edit: I changed
Code: [Select]
%format "fmt_album"       "%02d. %s - %s[%02d:%02d]" tracknum artist title Lm Ls ? albumartist = "Various Artists"
%format "fmt_album"       "%02d. %s[%02d:%02d]" tracknum title Lm Ls
to
Code: [Select]
%format "fmt_album"       "%02d. %s[%02d:%02d]" tracknum title Lm Ls ? artist = "Headhunterz & Wildstylez"
%format "fmt_album"       "%02d. %s - %s[%02d:%02d]" tracknum artist title Lm Ls ? albumartist = "Various Artists"
%format "fmt_album"       "%02d. %s[%02d:%02d]" tracknum title Lm Ls
(Headhunterz & Wildstylez is one of the albums with only one artist)
and all Tracks are displayed like this:%02d. %s[%02d:%02d]" tracknum title Lm Ls

I really don't know what i am doing wrong....
Title: Re: tagnavi.config v2.0 syntax
Post by: bascule on September 09, 2008, 03:44:29 PM
I really don't know what i am doing wrong....
Well, nor do I   :-\

Are you sure that your files are tagged with the exact string 'Various Artists' in the appropriate field for the filetype (BAND (MP3);ALBUMARTIST, ALBUM ARTIST, ENSEMBLE (Vorbis))?

The random thing comes now: if i comment out the 'fmt_album' lines and add another line like this
Code: [Select]
%format "fmt_album"       "%s" albumartist it displays all the albumartist-tags correctly.
Including the ones that you believe have been tagged as 'Various Artists'?


Maybe try something very simple such as:
Code: [Select]
%format "fmt_album"       "%s - %s" artist title ? albumartist = "Various Artists"
%format "fmt_album"       "%s" title
to rule out the (slim) possibility that the length of the format string is causing it to be somehow broken. At least it would check that the conditional logic that works for your 'Neophyte' example can work for 'Various Artists'.
Title: Re: tagnavi.config v2.0 syntax
Post by: CruX on September 10, 2008, 12:44:07 PM
I had another idea and it finally worked:
I changed the discnumber of the non-various artist albums from 0x to 0x0 (ex: 01 to 010) and changed fmt_album to this:
Code: [Select]
%format "fmt_album"       "%02d. %s[%02d:%02d]" tracknum title Lm Ls ? discnum > "09"
%format "fmt_album"       "%02d. %s - %s[%02d:%02d]" tracknum artist title Lm Ls

But this 'proves' that the 'albumartist'-comparison doesn't work atm!
(every1 can try it with the emu, tell me if you got other results :) )

greets CruX
Title: Re: tagnavi.config v2.0 syntax
Post by: quad on March 26, 2009, 10:15:21 AM
is it possible to create an empty line in the database view?

for instance:

-------------------
artist
album
track

custom1
custom2

audiobooks
-------------------

for best, the cursor jumps over these empty lines... ;)

i found a solution, but it's not that nice:

" " ==> "main"

problem is, when i select this entry, i will enter into another "main menu"-instance.

is there a cooler way to do this?
Title: Re: tagnavi.config v2.0 syntax
Post by: Didgeridoohan on June 29, 2009, 05:27:55 AM
I had another idea and it finally worked:
I changed the discnumber of the non-various artist albums from 0x to 0x0 (ex: 01 to 010) and changed fmt_album to this:
Code: [Select]
%format "fmt_album"       "%02d. %s[%02d:%02d]" tracknum title Lm Ls ? discnum > "09"
%format "fmt_album"       "%02d. %s - %s[%02d:%02d]" tracknum artist title Lm Ls

But this 'proves' that the 'albumartist'-comparison doesn't work atm!
(every1 can try it with the emu, tell me if you got other results :) )

greets CruX

Hi CruX!

I had this same problem with my custom tagnavi... So, I opened a bug report (http://www.rockbox.org/tracker/task/10374) for it, using your excellent post as a reference, and voila! The bug is confirmed, but it seems that if you enable "Load To RAM" it works. Give that a go and see if you can get it sorted.
Title: Re: tagnavi.config v2.0 syntax
Post by: fallout33 on December 03, 2009, 08:01:13 PM
Should be fixed now - thanks for reporting.

Rockbox: r23838-091203
Device: Sandisk Sansa e280

The problem of the incorrect sorting started to occur again (not very long ago but I don't know the exact version number).

Can you (or another developer) please take a look at it?

Thanks in advance!
Title: Re: tagnavi.config v2.0 syntax
Post by: fallout33 on December 09, 2009, 07:51:20 AM
*bump*

Could someone please re-open the closed bug report (http://www.rockbox.org/tracker/task/9104)?
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on December 09, 2009, 08:22:55 AM
Should be fixed now - thanks for reporting.

Version: r23838-091203

The problem of the incorrect sorting started to occur again (not very long ago but I don't know the exact version number).

I have been unable to reproduce the problem. The tagnavi from http://forums.rockbox.org/index.php?topic=6661.msg127575#msg127575 works as expected (gigabeatfx sim, default settings).

Please open a new flyspray report and supply more information.

Title: Re: tagnavi.config v2.0 syntax
Post by: fallout33 on December 09, 2009, 10:13:44 AM
[...] Please open a new flyspray report and supply more information.

I have done this now, but there was not much more information I could provide ...
http://www.rockbox.org/tracker/task/10839
Title: Re: tagnavi.config v2.0 syntax
Post by: fallout33 on March 11, 2010, 11:31:54 AM
Rockbox: r25114-100311
Device: Sandisk Sansa e280

When I try to apply the filter
Code: [Select]
"Artist - Title" -> title = "fmt_artist_title" ? filename !~ "/AUDIO/OE1" & filename !~ "/Audio/Bass")files that have have the following paths
Code: [Select]
<microSD1>/Audio/Bass/Test1.mp3 and
Code: [Select]
/AUDIO/OE1/Test2.mp3 are still listed.

How can I exclude files with these paths from the list?
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on March 11, 2010, 11:53:44 AM
Hm, it works for me in the sim, so not much I can do. I assume the extra closing bracket after the condition is just a typo in the forum?

Quote
How can I exclude files with these paths from the list?

You can place a database.ignore file in those dirs. See manual for more details.
Title: Re: tagnavi.config v2.0 syntax
Post by: fallout33 on March 11, 2010, 12:52:17 PM
[...] I assume the extra closing bracket after the condition is just a typo in the forum? [...]
The substring "<microSD1>" is the beginning of the filename when I access the file properties menu during playback or enter the "Files" menu from the main menu. It stands for the mount point of the microSDHC card which contains this file.

[...] You can place a database.ignore file in those dirs. [...]
Thank you, I will try that.
Title: Re: tagnavi.config v2.0 syntax
Post by: roolku on March 11, 2010, 12:59:53 PM
Quote
The substring "<microSD1>" is the beginning of the filename when I access the file properties menu during playback or enter the "Files" menu from the main menu. It stands for the mount point of the microSDHC card which contains this file.
I was referring to that line:

Code: [Select]
"Artist - Title" -> title = "fmt_artist_title" ? filename !~ "/AUDIO/OE1" & filename !~ "/Audio/Bass")
Title: Re: tagnavi.config v2.0 syntax
Post by: fallout33 on March 11, 2010, 01:11:02 PM
[...] I was referring to that line [...]
Oh, sorry, I misunderstood that.

[...] I assume the extra closing bracket after the condition is just a typo in the forum? [...]
Actually it is not only a typo in the forum but also in the config file too.

Sorry for bothering you with my mistake and thank you for your help!
Title: Re: tagnavi.config v2.0 syntax
Post by: iancer on June 13, 2015, 03:05:05 AM
Well guys, here is the config I am currently crying over.
I'm at a aloss as to how to whip this into working shape...
The main feature I am interested in is the Bitrate related entries.

Code: [Select]
#! rockbox/tagbrowser/2.0

#User-customisable Database viewer configuration file
#
# Required layout:
# Format declarations
# Sub-menu definitions
# Main menu definition
# Set menu as root

#Custom format declarations
# f_browse - basic tracknumber (padded with zeros to two characters) and title
# f_direct - title and artist for when the navigation leads directly to results by track
# f_chrono - includes year for year/decade based browsing
# f_runtime - top 100 tracks by times played (playcount) then autoscore. Sorted inverse to bring most-played to the top
# f_lastplayed- last 100 tracks played in play order. Sorted inverse to bring most recent to the top, but playcount display stripped out for clarity
# f_forgotten - as above, but sorted for least recent at the top
# f_mood - simple title and respective album
# f_radio - for sorting tracks in order of duration (length). Strip value of 15 = 8 for the length tag plus 7 for "/radio/", which all my podcast/radio tracks have in their filename
# f_radio_old - as per "f_lastplayed", but again with additional strip value to remove the first portion of the filepath

%format "f_browse" "%02d - %s" tracknum title
%format "f_direct" "%s (%s)" title artist
%format "f_chrono" "%04d - %s (%s)" year title artist
%format "f_runtime" "%2d|%3d %s (%s)" playcount autoscore title artist %sort = "inverse" %limit = "100"
%format "f_lastplayed"  "%06d%s (%s)" lastplayed title artist %sort = "inverse" %limit = "100" %strip = "6"
%format "f_forgotten"  "%06d%s (%s)" lastplayed title artist %limit = "100" %strip = "6"
%format "f_mood" "%s (%s)" title album
%format "f_radio" "%08d%s (%s)" length filename title %strip = "15"
%format "f_radio_old" "%06d%s (%s)" lastplayed filename title %sort = "inverse" %strip = "13"
%format “f_podcast_album” “%s” album ? genre == “podcast”
%format “f_podcast_title” “%s %s – %02d:%02d” basename title Lm Ls %sort = “inverse” %strip = “15” ? genre == “podcast”
%format “f_podcast_alphanum_title” “%s – %02d:%02d (%s)” basename Lm Ls filename ? title == “” & genre == “podcast”
%format “f_podcast_alphanum_title” “%s – %02d:%02d” title Lm Ls & genre == “podcast”
# Basic format declarations

%menu_start “meta_menu" “Metabase”
“Artist” -> artist ? genre != “podcast” -> title = "f_browse"cast” & genre != “audiobook” -> album -> title = “f_title” ? genre != “podcast” -> title = "f_browse"
“Album Artist” -> albumartist ? genre != “podcast” -> title = "f_browse"cast” & genre != “audiobook” -> album -> title = “f_title” ? genre != “podcast” -> title = "f_browse"
“Album” -> album ? genre != “podcast” -> title = "f_browse"cast” & genre != “audiobook” -> title = “f_title” ? genre != “podcast” -> title = "f_browse"
“Genre” -> genre -> artist -> album -> title = “f_title” ? genre != “podcast” -> title = "f_browse"
“Composer” -> composer -> album -> title = “f_title” ? genre != “podcast” -> title = "f_browse"
“Track” -> title = “f_alphanum_title” ? genre != “podcast” -> title = "f_browse"
“Year” -> year ? year > “0” -> artist -> album -> title = “f_title” ? genre != “podcast” -> title = "f_browse"
“User Rating” -> rating -> title = “f_browse"
“Recently Added” -> album ? entryage < “4” & commitid > “0” -> title = “f_browse"

%menu_start “broadcast” “Broadcasts”
“Audiobooks” -> album ? genre == “audiobook” -> title = “f_title” ? genre == “audiobook”” -> title = "f_browse"
"New Radio" -> title = "f_radio" ? filename ~ "/radio/" & playcount == "0"” -> title = "f_browse"
"Old Radio" -> title = "f_radio_old" ? filename ~ "/radio/" & playcount != "0"” -> title = "f_browse"
“New Podcasts” -> album ? genre == “podcast” -> title = “f_podcast_title” ? playcount == “0” & genre == “podcast”” -> title = "f_browse"
“Old Podcasts” -> album ? genre == “podcast” -> title = “f_podcast_title” ? playcount != “0” & genre == “podcast”” -> title = "f_browse"

%menu_start "other" "other"
"find file"    -> title ? filename ~ "" -> title = f_browse
"ogg"          -> album ? filename $ ".ogg" -> title = f_browse
"not mp3/ogg"  -> album ? filename !$ ".ogg" & filename !$ ".mp3"  -> title = "f_browse
"low Bitrate"  -> title = "%03d %s" bitrate title %sort = "inverse" ? bitrate < "128"
"high Bitrate" -> title = "%03d %s" bitrate title ? bitrate > "256"
"bad year"     -> title = "%04d %s" year title ? year > "0" & year < "1960"

%menu_start "custom" "Rockbox Browser"
"Metadata" ==> "meta_menu"
"Other"  ==> "other"
“Broadcasts” ==> “broadcast”

#This ensures that, rather than being accessed via the 'Custom...' entry in the default Database view, this custom menu *is* the default menu

#%root_menu "bascule"

#EOF