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
translations translations
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
| |-+  Theming and Appearance Customization
| | |-+  Customizing playlist using tagnavi_custom.config
« previous next »
  • Print
Pages: [1] 2

Author Topic: Customizing playlist using tagnavi_custom.config  (Read 23577 times)

Offline sammydee

  • Member
  • *
  • Posts: 16
Customizing playlist using tagnavi_custom.config
« on: March 25, 2007, 05:26:33 PM »
Hi.

I've never done any coding or anything before but I've just spent about an hour studying the tagnavi file and trying to understand the format and flags and what they do.

I want it so that instead of displaying "album" it displays "year - album". I tried adding this option to the tag navi file:

%format "fmt_album"       "%04d - %s" year album

It didn't work. All the albums had some collection of four digits before their name that was certainly not their year, so I tried:

%format "fmt_album"       "%04d - %s" year album ? year >"1900" & <"2010"
%format "fmt_album"       "%s" album

With this option, all of the albums displayed just the album name, no year number at all. Trying to understand what is going on here, I think that because the album does not have a year value associated with it, it does not bring up the correct year.

Is there a way of looking at the tag information for the tracks inside the album, and grabbing this and using that year as the year to put  before the album? If there is more than one year on the tags of the files, it should not display one.

Sam
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Customizing playlist using tagnavi_custom.config
« Reply #1 on: March 25, 2007, 05:29:20 PM »
It looks very much like your files aren't properly tagged.

http://www.mp3tag.de/en/ is the tagging app you want...
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline sammydee

  • Member
  • *
  • Posts: 16
Re: Customizing playlist using tagnavi_custom.config
« Reply #2 on: March 25, 2007, 05:33:09 PM »
I know that my files are properly tagged. If I go to the id3 info menu it shows me the year just fine.

Sam

EDIT: I use easytag (for linux). It's quite powerful, can replace/edit tags or extract information from the filename/file tree location using user-defined rules etc.
« Last Edit: March 25, 2007, 05:34:43 PM by sammydee »
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Customizing playlist using tagnavi_custom.config
« Reply #3 on: March 25, 2007, 05:48:16 PM »
Your formatting code is correct :)

Quote
All the albums had some collection of four digits before their name that was certainly not their year...

It sounds like they might be tagged with a date, not just a year. The rockbox Database expects string formats for year to be the ISO-whatever-it-is standard yyyy-mm-dd, so the figures you get back will be the first four digits, regardless. If your files are tagged dd-mm-yyyy or something other than yyyy- at the front, that is probably what you are seeing.

Easytag may either be obfuscating the year string to show just the year, or using one of the other tags in the file that is just the year. It's a bit of a complex subject :(

Some recent info here:
http://www.rockbox.org/tracker/task/6501
« Last Edit: March 25, 2007, 05:52:36 PM by bascule »
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline sammydee

  • Member
  • *
  • Posts: 16
Re: Customizing playlist using tagnavi_custom.config
« Reply #4 on: March 25, 2007, 05:54:54 PM »
Well I know that within the tags themselves the years are recorded as simple 4 digit numbers like this: yyyy. I'm quite anal about the tags on my music files, I have a system for it :)

How does the "year" option work, if you select it for "album" (or"artist" for that matter)? Is it an average of the dates of all the tracks in a particular album?

Sam

Logged

Offline sammydee

  • Member
  • *
  • Posts: 16
Re: Customizing playlist using tagnavi_custom.config
« Reply #5 on: March 25, 2007, 06:00:35 PM »
Well whether the files are mp3s or oggs the Year tag (when viewed through rockbox's own id3 info viewer) is displayed as yyyy.

Should it be displayed as yyyy-mm-dd to make it work properly?

I could try adding the following to the tagnavi.config file:

%format "fmt_title"       "%04d - %s" year title

And seeing what I get. If it works for individual tracks, then it is a different problem. If it doesn't, it is a tagging format problem.

Sam
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Customizing playlist using tagnavi_custom.config
« Reply #6 on: March 26, 2007, 03:43:22 AM »
* bascule pays attention this time

With what you wrote in your last comment, I finally realised what you were trying to do originally  :-\

You can only use a %format string for formatting the title of a track, it cannot be used for formatting within the album hierarchy (if that makes sense?)

What I thought you were trying to do (and for which your code was correct), was show the year and associated album for a specific track (which would work), but you were not displaying the track title, so it would have been even more confusing.

E.g.,

For browsing Artist > Album > Title
You can't have:
The Beatles > 1966-Revolver > Taxman
 Â                                       > Eleanor Rigby
 Â                                       > etc...

But you can have:
The Beatles > Revolver > Taxman (1966 - Revolver)
 Â                               > Eleanor Rigby (1966 - Revolver)
 Â                               > etc...

by using a format string like
%format "fmt_album"       "%s (%04d - %s)" title year album

You could also set up tagnavi to browse by year, either:
Year > Artist > Album > Title
or
Artist > Year > Album > Title

Quote from: sammydee on March 25, 2007, 05:54:54 PM
How does the "year" option work, if you select it for "album" (or"artist" for that matter)? Is it an average of the dates of all the tracks in a particular album?

You should have gathered by now that this question is not valid. Because Year tags are specific to and embedded within each individual track, Year just does not exist at Album or Artist level. When the Database is filtering through the hierarchy it is selecting tracks that match your selection. So if you had one track in an album missing the Artist tag, then it would never be displayed when browsing to that album via the Artist menu.

Please let me know how you get on... (or if I've just confused you more ;)
« Last Edit: March 26, 2007, 03:54:09 AM by bascule »
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline lexicon

  • Member
  • *
  • Posts: 25
Re: Customizing playlist using tagnavi_custom.config
« Reply #7 on: March 26, 2007, 08:21:04 AM »
Quote from: bascule on March 26, 2007, 03:43:22 AM
You can only  use a %format string for formatting the title of a track, it cannot be used for formatting within the album hierarchy (if that makes sense?)

...and that is too bad, because I've also really wanted to see the Album title displayed with its year (and -dream on, I know- sorted by year). Very useful when one has a band with an extensive, time-spanning discography... e.g. "let's listen to some early Floyd"

(and yes, thanks to the file tree browser that can typically be possible. But I'd rather be able to stay in the database for all interactions).

I'm not griping, just saying that I understand where the original poster is coming from... ;)

Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Customizing playlist using tagnavi_custom.config
« Reply #8 on: March 26, 2007, 08:43:38 AM »
I certainly empathise with the issue. Unfortunately, there's no easy workaround that is both powerful and flexible
You could set up an open query something like:

"Artist between years..."  -> artist ? year >= "" & year <= "" -> album -> title = "fmt_title"

Which is powerful, but not flexible (always an artist and always between two specified years)

or lots of pre-defined filter choices:

Year>artist>album>title
artist>year>album>title
decade>artist>album>title (using a sub-menu for decade)
etc.

Which is more flexible, but normally needs a lot of scrolling to get what you want...
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline sammydee

  • Member
  • *
  • Posts: 16
Re: Customizing playlist using tagnavi_custom.config
« Reply #9 on: March 26, 2007, 12:40:23 PM »
Ahh that makes sense to me now.

As lexicon said, I wanted to sort the albums by date.

I can't think of anything practical aside from mass renaming all album titles to yyyy - album but that's unweildy and it displays the year when all you want to see is the album title *sigh*.

I doubt that a feature like this will be coded anywhere in the near future, so I'll just have to live with it I guess :-\

Thanks for the help

Sam
Logged

Offline lexicon

  • Member
  • *
  • Posts: 25
Re: Customizing playlist using tagnavi_custom.config
« Reply #10 on: March 26, 2007, 01:16:42 PM »
Quote from: sammydee on March 26, 2007, 12:40:23 PM


I can't think of anything practical aside from mass renaming all album titles to yyyy - album but that's unweildy and it displays the year when all you want to see is the album title *sigh*.

well, almost. You can give up on the database and use the filetree browser instead. Keep your albums in well-organized file system:

\Artist1\1995 - Album1A
\Artist1\1997 - Album1B
\Artist2\1963 - Album 2A
...etc

in other words, use "\artist\year - album\track# - tracktitle" to organize files

and you can keep your files tagged properly so at least they'll display correctly in the wps .

At least with the new menu system it is easier to switch between database and filetree view!
Logged

Offline lexicon

  • Member
  • *
  • Posts: 25
Re: Customizing playlist using tagnavi_custom.config
« Reply #11 on: March 27, 2007, 01:54:17 PM »
Quote
\Artist1\1995 - Album1A
\Artist1\1997 - Album1B
\Artist2\1963 - Album 2A
...etc

in other words, use "\artist\year - album\track# - tracktitle" to organize files

(actually, I have it like "artist - year - album\track# - track title", but same idea)

now, a new workaround idea:

 - use the Comment field. Use foobar or another scriptable/configurable/batch tagger to set every track's Comment field to "year - album"

 - set up tagcache to browse through artist-comment-track, and that way the "comment" will actually be "chronologically sorted" albums

I haven't tried it yet, but that should work...right?

Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Customizing playlist using tagnavi_custom.config
« Reply #12 on: March 27, 2007, 02:32:18 PM »
Yep, that would work.
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline jrt

  • Member
  • *
  • Posts: 1
Re: Customizing playlist using tagnavi_custom.config
« Reply #13 on: May 30, 2007, 10:24:52 AM »
Quote from: bascule on March 26, 2007, 03:43:22 AM
You can only use a %format string for formatting the title of a track, it cannot be used for formatting within the album hierarchy (if that makes sense?)

Is this really correct?

Using:

%format "fmt_title"       "%s" title
%format "fmt_album"    "%s [YEAR]" album
#...
"Artist"   -> artist   -> album = "fmt_album" -> title = "fmt_title"

I get:

The Beatles > Revolver [YEAR] > Taxman

so it seems to work - a little bit, as if I use:

%format "fmt_title"       "%s" title
%format "fmt_album"    "%s [%d]" album year
#...
"Artist"   -> artist   -> album = "fmt_album" -> title = "fmt_title"

I get:

The Beatles > Revolver [-2] > Taxman

all the time, as if the value of year is invalid?!


  Jonas

Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Customizing playlist using tagnavi_custom.config
« Reply #14 on: May 31, 2007, 05:06:35 AM »
Interesting..

I can also get your The Beatles > Revolver [YEAR] > Taxman example to work, which surprised me, but I think it may be a bug more than a feature.

I am fairly certain that even that should not work.

I've also tried
%format "fmt_album"    "%s [%d]" album year
%format "fmt_album"    "%s [%s]" album artist
with no success.

If you think about it, it cannot work for many cases. What would you expect to see if, for example, your Revolver album tracks were tagged with different years. How could the code be expected to cope with that?

It's limited to formatting the title because you can assume that every display attribute has exactly one value, not many values.
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Customizing playlist using tagnavi_custom.config
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.155 seconds with 20 queries.