Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  [unsolvable] format year results in "-2"
« previous next »
  • Print
Pages: [1]

Author Topic: [unsolvable] format year results in "-2"  (Read 1306 times)

Offline sumrb

  • Member
  • *
  • Posts: 2
[unsolvable] format year results in "-2"
« 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
Therefore I created
Code: [Select]
format "fmt_album"       "(%d) %s" year album
and modified
Code: [Select]
%menu_start "main" "Database"
"Artist"   -> artist   -> album = "fmt_album" -> title = "fmt_title"

What I get is:
Quote
(-2) Albumname

If I instead use
Code: [Select]
%format "fmt_album"       "(%d) %s" year album ? year > "0"
I get :
Quote
Albumname

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.
« Last Edit: November 20, 2015, 07:25:38 AM by sumrb »
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 415
Re: format year results in "-2"
« Reply #1 on: November 19, 2015, 01:46:00 PM »
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
Therefore I created
Code: [Select]
format "fmt_album"       "(%d) %s" year album
and modified
Code: [Select]
%menu_start "main" "Database"
"Artist"   -> artist   -> album = "fmt_album" -> title = "fmt_title"

What I get is:
Quote
(-2) Albumname

If I instead use
Code: [Select]
%format "fmt_album"       "(%d) %s" year album ? year > "0"
I get :
Quote
Albumname

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.

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

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.
« Last Edit: November 19, 2015, 01:54:26 PM by Frankenpod »
Logged

Offline sumrb

  • Member
  • *
  • Posts: 2
Re: format year results in "-2"
« Reply #2 on: November 20, 2015, 07:24:14 AM »
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

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: [Select]
%format "fmt_mytitle"       "%s - %d" title year
the year is shown correctly in the title.

I also tried something like
Code: [Select]
%format "fmt_year"       "(%i) %s" year album ? year > "0"
"Artist Year"   -> artist   -> year = "fmt_year" -> title = "fmt_title"

This resulted in an output of:
Quote
(1995         
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.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  [unsolvable] format year results in "-2"
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.065 seconds with 15 queries.