Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: some-xtc on January 04, 2011, 06:31:50 PM

Title: Logical connectives in the database?
Post by: some-xtc on January 04, 2011, 06:31:50 PM
Following situation:

I have a long and messy "albumartist"-list, so I want to make it clearer.

But instead of usind the 'classic'-way like:
Code: [Select]
"A"   -> albumartist ? albumartist ^ "A" -> album  -> title = "f_browse"
"B"   -> albumartist ? albumartist ^ "B" -> album  -> title = "f_browse"
"C"   -> albumartist ? albumartist ^ "C" -> album  -> title = "f_browse"
"D"   -> albumartist ? albumartist ^ "D" -> album  -> title = "f_browse"
....

I want  to merge the first letters from the "albumartist"-tag too, to have a short, alphabetical list:
A, B, C, D
E, F, G, H
....

With my modarate programming knowledge I thought, it would be work, if I use the logical connective  "|" [or]:
Code: [Select]
"A, B, C, D"   -> albumartist ? albumartist ^ "A" | albumartist ^ "B" | albumartist ^ "C" | albumartist ^ "D" -> album  -> title = "f_browse"


But nope: It does not work.

Can someone help me?
Or is "&" the only one logical connectives allowed?

Thanks!
Title: Re: Logical connectives in the database?
Post by: sideral on May 04, 2011, 08:26:19 AM
The bad news: You're right, tagnavi conditionals currently do not support a logical-or operator.

The good news: I've just implemented it. Head over to http://www.rockbox.org/tracker/task/12095 if you want to help testing it.