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:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Creating custom Tagcache query?
« previous next »
  • Print
Pages: 1 [2] 3

Author Topic: Creating custom Tagcache query?  (Read 13029 times)

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #15 on: October 09, 2006, 05:19:05 PM »
I discovered the problem by looking at the patch code and trial % error: you can't specify a list of more than 3 values. Is there any way to remove this limit, or allow the user to set this limit?
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #16 on: October 09, 2006, 05:31:27 PM »
Bug report here.
Logged

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Creating custom Tagcache query?
« Reply #17 on: October 09, 2006, 06:40:58 PM »
Quote from: afruff23 on October 09, 2006, 05:19:05 PM
I discovered the problem by looking at the patch code and trial % error: you can't specify a list of more than 3 values. Is there any way to remove this limit, or allow the user to set this limit?

Well, there is no intentional limit in the number of items, but I can confirm the problem. The function seems to return true for all cases for long lists. Which is odd, as it doesn't do it in my testbed outside rockbox. I suspect a buffer overflow and will investigate further.....

EDIT: I have uploaded a patch to the tracker.
« Last Edit: October 09, 2006, 08:08:20 PM by roolku »
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #18 on: October 10, 2006, 12:06:25 AM »
Could you please submit this patch separately so it gets noticed? Also, can you allow the user to set the limit to their own will like maximum playlist sizes? Thanks again.
Logged

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Creating custom Tagcache query?
« Reply #19 on: October 10, 2006, 04:55:10 AM »
Quote from: afruff23 on October 10, 2006, 12:06:25 AM
Could you please submit this patch separately so it gets noticed?
I don't think the developers would appreciate that. If you want to get it in, you could talk to slasheri on irc.

Quote
Also, can you allow the user to set the limit to their own will like maximum playlist sizes?

From experience that would have no chance of getting into cvs. I think 128 bytes is a good compromise.

EDIT: now in cvs
« Last Edit: October 10, 2006, 06:51:32 AM by roolku »
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #20 on: October 10, 2006, 02:42:16 PM »
Thanks very much!
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #21 on: October 10, 2006, 03:51:59 PM »
It doesn't work. :(
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #22 on: October 10, 2006, 03:59:36 PM »
When my original playlists didn't work, I tried another one:
Code: [Select]
"A" -> artist ? genre @ "Classic Rock|Grunge|Rock" -> album -> title = "%02d. %s" tracknum title

This works, but over 32 characters does not, so the following does not work:
Code: [Select]
"B" -> artist ? genre @ "Classic Rock|Grunge|Progressive Rock" -> album -> title = "%02d. %s" tracknum title

This works:

Code: [Select]
"C" -> artist ? genre @ "Hard Rock|Grunge|Rock|Metal" -> album -> title = "%02d. %s" tracknum title

So, the 32 character limit is still in place. Obviously I'm using the bleeding edge build.
« Last Edit: October 10, 2006, 04:05:15 PM by afruff23 »
Logged

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Creating custom Tagcache query?
« Reply #23 on: October 10, 2006, 08:47:54 PM »
Yup, I was just about to tell you that your example worked fine for me, when I realised that I had posted the wrong patch. :(

Here is the corrective patch.

[attachment deleted by admin, too old]
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #24 on: October 10, 2006, 08:52:01 PM »
You had better tell Miika Pekkarinen. He committed that other patch. If I knew how to contact him, I would do it myself. Sorry. Or you could submit this patch yourself. Thanks again for all the work.
Logged

Offline Febs

  • Member
  • *
  • Posts: 2701
Re: Creating custom Tagcache query?
« Reply #25 on: October 10, 2006, 09:35:27 PM »
The best way to contact him is on IRC.  He uses the name Slasheri.
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way
Please do not send me support questions via PM.

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #26 on: October 10, 2006, 09:52:16 PM »
Oh right. Forgot about that. Going now...
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #27 on: October 11, 2006, 06:30:01 AM »
It should work now. I'll test later today.
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #28 on: October 11, 2006, 03:12:26 PM »
It works! Thanks a lot to roolku and slasheri for their hard work. Rockbox is now the only DAP software which allows for instant creation of smart playlists (albeit rather simple).
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Creating custom Tagcache query?
« Reply #29 on: October 14, 2006, 05:41:28 AM »
Some new questions:

I've successfully got my custom tagnavi working, with a couple of exceptions. I'm not sure if they are bugs or not.

I'm trying to add a line to display all artists beginning with non-alphabetic characters (911, 50 Cent etc.). I don't just want to look for artists beginning with 0 to 9, as that may exclude some bizarre entries beginning with other characters.

I've tried the following lines and they both only exclude the first query term:
Code: [Select]
"Non-Alphabetical A-E"   -> artist ? artist !^ "A" & !^ "B" & !^ "C" & !^ "D" & !^ "E" -> album  -> title = "%02d %s" tracknum title
This lists all artists except those beginning with 'A'

Code: [Select]
"Non-Alphabetical B&C"   -> artist ? artist !^ "B" & !^ "C" -> album  -> title = "%02d %s" tracknum title
This lists all artists except those beginning with 'B'

It seems that multiple negative queries (does NOT begin with "A" AND does not NOT begin with "B" AND does NOT etc...) do not work correctly.

Similarly, I'm trying to separately list artists beginning with 'T', but not 'The ' and those solely beginning with 'The '

I've tried the following lines
Code: [Select]
"T1"   -> artist ? artist !^ "The " & ^ "T" -> album  -> title = "%02d %s" tracknum title
This lists all artists except those beginning with 'The '

Code: [Select]
"T2"   -> artist ? artist ^ "T" & !^ "The " -> album  -> title = "%02d %s" tracknum title
This lists all artists beginning with 'T', but includes all those beginning with 'The ', which it shouldn't.

It seems like the same problem as above, that concatenated search queries are broken if one of them is a NOT query.

Can anyone confirm, deny or put me straight on this one? If confirmed, I'll raise a bug.
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

  • Print
Pages: 1 [2] 3
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Creating custom Tagcache query?
 

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

Page created in 0.088 seconds with 15 queries.