Support and General Use > Audio Playback, Database and Playlists

tagnavi custom help. check if tag exists?

(1/1)

marc2003:
i've looked at the wiki but i'm really struggling with the syntax. i just want to modify the default "album artist" option slightly


--- Code: ---albumartist -> album  -> title = "fmt_title"
--- End code ---

i only want the "albumartist" list populated with tracks where the "album" tag is present. i have lots of random tracks without album tags and i don't want those artists polluting this list but i can't figure out how to do it.  ???

i crudely tried this but it didn't work. when selecting the "albumartist" entry, i was given the rockbox text editor.


--- Code: ---albumartist ? album != "" -> album  -> title = "fmt_title"
--- End code ---

sideral:
Yes, "" fires up the text editor to allow searching for a user-provided string (see http://www.rockbox.org/wiki/DataBase#tagnavi.config_v2.0_Syntax).

Comparing against an empty string or looking for nonexistent tags does not seem to be possible right now. I regard this as a limitation of the tagnavi format that should be fixed. One way to fix this would be to introduce a new literal for empty strings (such as empty or "#empty#"; not "" to remain backward compatible).

This shouldn't be difficult to implement. If you feel adventurous, feel free to try this yourself and submit a patch.

marc2003:
thanks for replying but i think creating patches is a bit beyond me. i can apply patches and compile but that's about my limit.  ;D

i've got around it by using the filename to filter out tracks that are in an "albums" folder.


--- Code: ---"Album Artist" -> albumartist ? filename ~ "/albums" -> album -> title = "fmt_title"
--- End code ---

sideral:
After pondering this some more, I think there already is a supported way of checking whether a tag exists: Apparently all unset tags are automatically linked to the string "<Untagged>".  So the canonical way of doing what you want should be:

--- Code: ---albumartist ? album != "<Untagged>" -> album -> title = "fmt_title"
--- End code ---

Could you please try whether this works for you?

marc2003:
yup, that also works. thanks.

Navigation

[0] Message Index

Go to full version