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
| | |-+  tagnavi custom help. check if tag exists?
« previous next »
  • Print
Pages: [1]

Author Topic: tagnavi custom help. check if tag exists?  (Read 1482 times)

Offline marc2003

  • Member
  • *
  • Posts: 36
tagnavi custom help. check if tag exists?
« on: April 16, 2011, 04:10:59 AM »
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: [Select]
albumartist -> album  -> title = "fmt_title"

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: [Select]
albumartist ? album != "" -> album  -> title = "fmt_title"
Logged

Offline sideral

  • Developer
  • Member
  • *
  • Posts: 48
Re: tagnavi custom help. check if tag exists?
« Reply #1 on: April 18, 2011, 06:14:50 AM »
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.
Logged

Offline marc2003

  • Member
  • *
  • Posts: 36
Re: tagnavi custom help. check if tag exists?
« Reply #2 on: April 18, 2011, 02:46:21 PM »
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: [Select]
"Album Artist" -> albumartist ? filename ~ "/albums" -> album -> title = "fmt_title"
Logged

Offline sideral

  • Developer
  • Member
  • *
  • Posts: 48
Re: tagnavi custom help. check if tag exists?
« Reply #3 on: May 02, 2011, 09:41:00 AM »
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: [Select]
albumartist ? album != "<Untagged>" -> album -> title = "fmt_title"

Could you please try whether this works for you?
Logged

Offline marc2003

  • Member
  • *
  • Posts: 36
Re: tagnavi custom help. check if tag exists?
« Reply #4 on: May 02, 2011, 11:43:17 AM »
yup, that also works. thanks.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  tagnavi custom help. check if tag exists?
 

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

Page created in 0.064 seconds with 15 queries.