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 logical OR?
« previous next »
  • Print
Pages: [1]

Author Topic: tagnavi logical OR?  (Read 2116 times)

Offline lexicon

  • Member
  • *
  • Posts: 25
tagnavi logical OR?
« on: December 21, 2006, 07:26:37 PM »
Hi All-

Does tagnavi.config support an OR operator?

Building on this great tagnavi_custom.config that you can see here:

#! rockbox/tagbrowser/2.0
# by bascule from roolku v.0.1
#from http://forums.rockbox.org/index.php?topic=6661.30


I want to be able to do this:

"A"   -> artist ? artist ^ "A" OR artist ^ "The A" -> album  -> title = "f_browse"
...B OR The B
...C OR The C
etc.

so that "The" is effectively ignored and grouped accordingly.

i.e.
Artist Menu, Choose "C", and be presented with:
Cardigans
The Clash
Corb Lund

There is an & operator, but I don't see an OR. If not, I believe it would be a valid (and easy) feature request - any comments?

There used to be an "ignore the" patch, but I can't find it, and I assume it would be way out of sync with all the recent upadtes these last few months.

Thanks.
Logged

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: tagnavi logical OR?
« Reply #1 on: December 21, 2006, 08:39:39 PM »
Quote from: lexicon on December 21, 2006, 07:26:37 PM
Does tagnavi.config support an OR operator?

No.

Quote
There is an & operator, but I don't see an OR. If not, I believe it would be a valid (and easy) feature request - any comments?

With the way the engine is written (incrementally reducing the result set) it is very difficult to add an OR operator.  However it is a very resource efficient implementation, so I don't think it is likely to be changed.
Logged

Offline lexicon

  • Member
  • *
  • Posts: 25
Re: tagnavi logical OR?
« Reply #2 on: December 21, 2006, 08:42:40 PM »
ok, thanks for the answer. too bad, but I understand.

p.s. Thanks for the great config file, too!
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: tagnavi logical OR?
« Reply #3 on: December 22, 2006, 03:03:08 AM »
Quote from: lexicon on December 21, 2006, 08:42:40 PM
p.s. Thanks for the great config file, too!

No problem ;D

I wrote the config file that way specifically because there is no OR operator. The only way is my (very slightly clunky) grouping of all 'The...' artists together. It works for me, though, and I'm glad it mostly works for you.
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline lexicon

  • Member
  • *
  • Posts: 25
Re: tagnavi logical OR?
« Reply #4 on: December 22, 2006, 08:44:49 AM »
I have an idea... roolku  ;) ...

I see you made a patch that got accepted @ (one_of).

What about a new operator "begins_with_one_of"?

"A"   -> artist ? artist $ "A|The A" -> album  -> title = "f_browse"

Then tagnavi could easily handle the "The " issue, or "A ", or similar for any other language, too (provided the first-level A,B,C...menus were used like you guys did).

Thoughts?
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: tagnavi logical OR?
« Reply #5 on: December 22, 2006, 09:07:02 AM »
Quote from: lexicon on December 22, 2006, 08:44:49 AM
I have an idea... roolku  ;) ...

I see you made a patch that got accepted @ (one_of).

What about a new operator "begins_with_one_of"?

"A"   -> artist ? artist $ "A|The A" -> album  -> title = "f_browse"

Then tagnavi could easily handle the "The " issue, or "A ", or similar for any other language, too (provided the first-level A,B,C...menus were used like you guys did).

Thoughts?

I think someone did; trawl through the tag cache threads, I'm sure there was a mention of another patch (never committed) that did that very thing.

A more flexible solution would be the ability to combine operators:

"A"   -> artist ? artist ^@ "A|The A" -> album  -> title = "f_browse" (starts with one-of...)
"blah"   -> album ? filename !$@ "mp3|ogg" -> album  -> title = "f_browse" (does not end with one-of...)
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: tagnavi logical OR?
« Reply #6 on: December 22, 2006, 09:44:16 AM »
Quote from: lexicon on December 22, 2006, 08:44:49 AM
I see you made a patch that got accepted @ (one_of).

What about a new operator "begins_with_one_of"?

I already made one. :)

But the approach has a problem with the letter T.
« Last Edit: December 22, 2006, 09:47:39 AM by roolku »
Logged

Offline lexicon

  • Member
  • *
  • Posts: 25
Re: tagnavi logical OR?
« Reply #7 on: December 22, 2006, 10:01:10 AM »
bascule:
combining operators, yeah, that was my first thought, too. That would open up a lot of possibilities

roolku:
problem with T? Why, because 'The' starts with 'T'? I can't quite figure out the logic breakdown - do you think there is a solution (even if it is a special case)?


Well, in the meantime, I think I'll try hijacking the Composer field. Just put an A,B,C,... in there and base the filters off that.

e.g.
ABBA  - Composer = A
The Arcade Fire - Composer = A
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  tagnavi logical OR?
 

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

Page created in 0.076 seconds with 15 queries.