Rockbox General > Rockbox General Discussion
need help with tagnavi: a search not working and OR operator
(1/1)
polygonal:
With the help of the database Wiki, I created a custom tagnavi config file that works very well for myself. But there are two things that bug me:
1. I have a search that asks for two parameters:
"Artist starting with... and track containing..." -> album ? artist ^ "" & title ~ "" -> title = "f_browse"
When I perform the search, nothing shows up. But when I do the individual searches alone (i.e. only the artist ^ "" part or the title ~ "" part, the track I want is there. As far as I can see, my syntax is the same as the similar search in the example in Wiki (search between years), which, of course, works fine. Can anyone point out what I did wrong here?
2. The multiple conditions for filter is connected by "&", which I take as the AND boolean operator. Are there ways to achieve the OR boolean operator? The "@" works only with exact strings... Specifically, I'm trying to put the "The ..." albums, artists, etc. with their non-The counterpart, something like
"A" -> album ? album ^ "A" OR album ^ "the a" -> title = "f_browse"
Is is possible?
Thanks
bascule:
1. That looks OK to me. How large is your tagnavi file? I ask because there is some sort of a maximum and strange things happen when you go over the top.
Try deleting a couple of other lines and trying again.
2. No. OR is not supported and the general feeling has been that it is unlikely to be as it is an order of magnitude more complex than and AND condition.
The 'one-of' operator is designed to be the best alternative to OR.
polygonal:
--- Quote from: bascule on July 21, 2007, 03:24:02 PM ---1. That looks OK to me. How large is your tagnavi file? I ask because there is some sort of a maximum and strange things happen when you go over the top.
Try deleting a couple of other lines and trying again.
--- End quote ---
My tagnavi file is about 140 lines without comments, and about 9kb with comments. I don't think it's unusually long...
--- Quote ---2. No. OR is not supported and the general feeling has been that it is unlikely to be as it is an order of magnitude more complex than and AND condition.
The 'one-of' operator is designed to be the best alternative to OR.
--- End quote ---
So there is no way out of creating a separate "The..." entry? It seems to me that a restricted usage of OR is about combining results and removing duplicates, which does not seem too hard. But I'm only a visual basic hobbyist ;)
polygonal:
Well, I removed everything in the custom tagnavi file except that search, and it still does not work :(
sideral:
Just a quick heads up: Since Rockbox 3.9, the tagnavi format now supports the logical-OR operator “|†in conditions. The DataBase wiki page has the details:
http://www.rockbox.org/wiki/DataBase#Database_files_file_45format
Navigation
[0] Message Index
Go to full version