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
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  tagnavi.config v2.0 syntax
« previous next »
  • Print
Pages: 1 ... 4 5 [6] 7

Author Topic: tagnavi.config v2.0 syntax  (Read 48776 times)

Offline jsn5406

  • Member
  • *
  • Posts: 5
Re: tagnavi.config v2.0 syntax
« Reply #75 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]
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: tagnavi.config v2.0 syntax
« Reply #76 on: March 16, 2007, 03:44:09 AM »
Quote from: jsn5406 on March 15, 2007, 03:08:44 PM
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 :(

Quote from: jsn5406 on March 15, 2007, 03:08:44 PM
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
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline Xezzy

  • Member
  • *
  • Posts: 2
Re: tagnavi.config v2.0 syntax
« Reply #77 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?
« Last Edit: March 22, 2008, 08:56:53 AM by Xezzy »
Logged

Offline KindOfBlues71

  • Member
  • *
  • Posts: 44
Re: tagnavi.config v2.0 syntax
« Reply #78 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
Logged
“Don't play what's there, play what's not there.” - Miles Davis

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: tagnavi.config v2.0 syntax
« Reply #79 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.
Logged

Offline KindOfBlues71

  • Member
  • *
  • Posts: 44
Re: tagnavi.config v2.0 syntax
« Reply #80 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
« Last Edit: March 26, 2008, 09:51:11 AM by KindOfBlues71 »
Logged
“Don't play what's there, play what's not there.” - Miles Davis

Offline Xezzy

  • Member
  • *
  • Posts: 2
Re: tagnavi.config v2.0 syntax
« Reply #81 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!
Logged

Offline fallout33

  • Member
  • *
  • Posts: 10
order by artist & title and display "<artist> - <title>"
« Reply #82 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?
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: tagnavi.config v2.0 syntax
« Reply #83 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.
« Last Edit: June 19, 2008, 05:02:33 AM by bascule »
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: tagnavi.config v2.0 syntax
« Reply #84 on: July 01, 2008, 05:14:06 PM »
Quote from: bascule on June 19, 2008, 04:17:32 AM

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.
Logged

Offline CruX

  • Member
  • *
  • Posts: 2
Re: tagnavi.config v2.0 syntax
« Reply #85 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....
« Last Edit: September 07, 2008, 09:38:03 AM by CruX »
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: tagnavi.config v2.0 syntax
« Reply #86 on: September 09, 2008, 03:44:29 PM »
Quote from: CruX on September 07, 2008, 07:44:07 AM
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))?

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: [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'.
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline CruX

  • Member
  • *
  • Posts: 2
Re: tagnavi.config v2.0 syntax
« Reply #87 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
Logged

Offline quad

  • Member
  • *
  • Posts: 18
Re: tagnavi.config v2.0 syntax
« Reply #88 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?
Logged
#quad.dot

Offline Didgeridoohan

  • Member
  • *
  • Posts: 102
Re: tagnavi.config v2.0 syntax
« Reply #89 on: June 29, 2009, 05:27:55 AM »
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: [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.
Logged
Remember, the MANUAL, WIKI and the SEARCH funtions are your friends.

  • Print
Pages: 1 ... 4 5 [6] 7
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  tagnavi.config v2.0 syntax
 

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

Page created in 0.214 seconds with 22 queries.