Support and General Use > Audio Playback, Database and Playlists
[unsolvable] format year results in "-2"
(1/1)
sumrb:
Hi all,
I'm trying to modify the format of albums in the database. I would like to have an output like:
--- Quote ---(1995) Albumname
--- End quote ---
Therefore I created
--- Code: ---format "fmt_album" "(%d) %s" year album
--- End code ---
and modified
--- Code: ---%menu_start "main" "Database"
"Artist" -> artist -> album = "fmt_album" -> title = "fmt_title"
--- End code ---
What I get is:
--- Quote ---(-2) Albumname
--- End quote ---
If I instead use
--- Code: ---%format "fmt_album" "(%d) %s" year album ? year > "0"
--- End code ---
I get :
--- Quote ---Albumname
--- End quote ---
Can you please tell me what is wrong?
The id tag is definitely not empty. The year is also shown correctly when I sort the database by year.
Frankenpod:
--- Quote from: sumrb on November 18, 2015, 04:00:02 PM ---Hi all,
I'm trying to modify the format of albums in the database. I would like to have an output like:
--- Quote ---(1995) Albumname
--- End quote ---
Therefore I created
--- Code: ---format "fmt_album" "(%d) %s" year album
--- End code ---
and modified
--- Code: ---%menu_start "main" "Database"
"Artist" -> artist -> album = "fmt_album" -> title = "fmt_title"
--- End code ---
What I get is:
--- Quote ---(-2) Albumname
--- End quote ---
If I instead use
--- Code: ---%format "fmt_album" "(%d) %s" year album ? year > "0"
--- End code ---
I get :
--- Quote ---Albumname
--- End quote ---
Can you please tell me what is wrong?
The id tag is definitely not empty. The year is also shown correctly when I sort the database by year.
--- End quote ---
Bear in mind I don't know much about this (I eventually managed to work out how to write my own tagnavi custom file to do what I wanted - separating out podcasts - but that's about all I know).
But as nobody who knows more has yet answered, is it relevant that it says in the documentation for tagnavi syntax:
--- Quote ---Note: a %format string can be used for formatting only the track title. It cannot be used for formatting within the album hierarchy http://forums.rockbox.org/index.php?topic=9570.0
--- End quote ---
Edit - yeah, I think the link to the thread at the end of that quote pretty much answers your question! Sounds as if Rockbox can't really do what you want it to do there - I guess because 'year' is a property of a track not an album.
sumrb:
--- Quote ---Note: a %format string can be used for formatting only the track title. It cannot be used for formatting within the album hierarchy http://forums.rockbox.org/index.php?topic=9570.0
--- End quote ---
First of all sorry for this double post. I didn't see this thread as I quickly browsed the forum. This is exactly the same topic.
I think you are perfectly right. By doing something like
--- Code: ---%format "fmt_mytitle" "%s - %d" title year
--- End code ---
the year is shown correctly in the title.
I also tried something like
--- Code: ---%format "fmt_year" "(%i) %s" year album ? year > "0"
"Artist Year" -> artist -> year = "fmt_year" -> title = "fmt_title"
--- End code ---
This resulted in an output of:
--- Quote ---(1995
--- End quote ---
So in this case the string "album" could not be read.
I hope that in future versions this gets implemented, since it would enhance browsing in the database a lot.
Thanks for your help.
Navigation
[0] Message Index
Go to full version