Rockbox General > Rockbox General Discussion

tagnavi.config v2.0 syntax

<< < (18/20) > >>

CruX:
[r18435]
Hey guys,

I'm trying to configure my Rockbox(using an Sandisk Sansa e260) for a few hours now.
My 'tagnavi.config':

--- Code: ---#! 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"

--- End code ---
(i deleted a few parts to save space)
My main problem is the

--- Code: ---%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
--- End code ---
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: ---%format "fmt_album"       "%s" albumartist
--- End code ---
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: ---%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
--- End code ---
everything works like a charm...[Neophyte is one of my artists]

thanks in advance
CruX


Edit: I changed

--- Code: ---%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
--- End code ---
to

--- Code: ---%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
--- End code ---
(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....

bascule:

--- Quote from: CruX on September 07, 2008, 07:44:07 AM ---I really don't know what i am doing wrong....

--- End quote ---
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))?


--- Quote from: CruX on September 07, 2008, 07:44:07 AM ---The random thing comes now: if i comment out the 'fmt_album' lines and add another line like this

--- Code: ---%format "fmt_album"       "%s" albumartist
--- End code ---
it displays all the albumartist-tags correctly.

--- End quote ---
Including the ones that you believe have been tagged as 'Various Artists'?


Maybe try something very simple such as:

--- Code: ---%format "fmt_album"       "%s - %s" artist title ? albumartist = "Various Artists"
%format "fmt_album"       "%s" title

--- End code ---
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'.

CruX:
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: ---%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
--- End code ---

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

quad:
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?

Didgeridoohan:

--- Quote from: 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: ---%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
--- End code ---

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

--- End quote ---

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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version