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 13027 times)

Offline Slasher

  • Developer
  • Member
  • *
  • Posts: 35
Re: Creating custom Tagcache query?
« Reply #30 on: October 14, 2006, 08:20:06 AM »
Please try with the following syntax:
Code: [Select]
"Non-Alphabetical B&C"   -> artist ? artist !^ "B" & artist !^ "C" -> album  -> title = "%02d %s" tracknum title

That's because it's possible to include different tags in one search clause.
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Creating custom Tagcache query?
« Reply #31 on: October 14, 2006, 12:34:23 PM »
D'oh!

Of course. It's so simple and if I'd not had 'code-blindness' when I looked at roolku's original, I would have seen how it worked. Thanks very much.

That's solved the 'T vs The' problem.

It would also fix the other problem, but I've come up with a neater solution by using less than:

Quote from: bascule link=topic=6866.msg54399#msg54399
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.

Code: [Select]
"Non-alpha"   -> artist ? artist < "A" -> album  -> title = "%02d %s" tracknum title

This certainly works on numerics, have not yet created a test file for non-alphanumerics such as # or ! ... ;)
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Creating custom Tagcache query?
« Reply #32 on: October 15, 2006, 05:15:02 AM »
Quote from: Slasher on October 14, 2006, 08:20:06 AM
Please try with the following syntax:
Code: [Select]
"Non-Alphabetical B&C"   -> artist ? artist !^ "B" & artist !^ "C" -> album  -> title = "%02d %s" tracknum title

That's because it's possible to include different tags in one search clause.

Unfortunately this still doesn't work for the case in question, as there is a limit  (I think 16) on how many clauses one can have and there are 26 letters. And I guess Amicon wouldn't like another size increase...

Quote from: bascule on October 14, 2006, 12:34:23 PM
Quote from: bascule link=topic=6866.msg54399#msg54399
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.

Code: [Select]
"Non-alpha"   -> artist ? artist < "A" -> album  -> title = "%02d %s" tracknum title

This certainly works on numerics, have not yet created a test file for non-alphanumerics such as # or ! ... ;)

That is exactly the case I created patch #6098 for (which Slasheri kindly comitted). It works with punctuation and so on, but it doesn't catch various unicode characters. For ASCII (and most European languages) you should be okay.

Maybe we could start sharing our tagnavi.config files so we can get inspiration from each other. I have included my current one here.

[attachment deleted by admin, too old]
Logged

Offline bascule

  • Rockbox Expert
  • Member
  • *
  • Posts: 1298
Re: Creating custom Tagcache query?
« Reply #33 on: October 15, 2006, 01:25:36 PM »
Quote from: roolku
Unfortunately this still doesn't work for the case in question, as there is a limit  (I think 16) on how many clauses one can have and there are 26 letters.

So, I presume that's different from the (recently increased) overall 128-byte limit for a query string?

I'm hoping you can clear this up. Can you have 16 128-byte clauses, or 16 clauses with a total length of 128 bytes?

And what bit of the line exactly constitutes the 'query clause'?

Anyway, currently I'm happy with the < "A" solution :D
Logged
DataBase fanboy and author of the totally overhauled Rockbox Sync Tool

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Creating custom Tagcache query?
« Reply #34 on: October 15, 2006, 02:39:03 PM »
Quote from: bascule on October 15, 2006, 01:25:36 PM
So, I presume that's different from the (recently increased) overall 128-byte limit for a query string?

The 128 byte limit is for individual strings (the things between ")

Quote
I'm hoping you can clear this up. Can you have 16 128-byte clauses, or 16 clauses with a total length of 128 bytes?

16 clauses with 128 bytes before and 128 bytes after the operator

Quote
And what bit of the line exactly constitutes the 'query clause'?

"tag" "operator" "constant string"

You can have several of these seperated by & (and). They are used as conditions to reduce the result set.

But this might all be out of date with Slasheri's latest update. I'll will change the Wiki when I am back from my holidays.
« Last Edit: October 15, 2006, 02:40:59 PM by roolku »
Logged

Offline Yotto

  • Artist
  • Member
  • *
  • Posts: 826
  • Every Silver Lining has a Cloud
    • My Blog
Re: Creating custom Tagcache query?
« Reply #35 on: October 15, 2006, 06:58:35 PM »
Quote from: bascule on October 15, 2006, 01:25:36 PM
Anyway, currently I'm happy with the < "A" solution :D

Couldn't you do 2 clauses:

< "A"
> "Z"
Logged
Pulp Audio Weekly - Where we talk about News, Reviews, and pretty much anything else we feel like discussing.

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #36 on: October 16, 2006, 01:37:01 AM »
Lol, what are your holidays?

Does Slasheri's latest tagcache update break anything?
« Last Edit: October 16, 2006, 01:40:33 AM by afruff23 »
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #37 on: November 11, 2006, 11:22:19 PM »
How do you make a recently added query? WHat about a list of compilation albums? Or is this not possible?
Logged

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: Creating custom Tagcache query?
« Reply #38 on: November 12, 2006, 01:23:23 PM »
Quote from: afruff23 on November 11, 2006, 11:22:19 PM
How do you make a recently added query?

You can't. Even if you created an additional tag for file date, the problem would be that the file date doesn't signify when a file was uploaded, but when it was created (or modified).

My workaround is to have:

"not played"    -> artist ? playcount == "0" -> album -> title

But obviously this only works until you have listened to the song.

I can't see a reliable way to detect a "recently added" file - do you have a suggestion?

Quote from: afruff23 on November 11, 2006, 11:22:19 PM
WHat about a list of compilation albums? Or is this not possible?

Only if you tagged them consistently somehow. E.g. you could use patch http://www.rockbox.org/tracker/task/6301  and put "compilation" in the comment tag.

"Compilations" -> album ? comment = "compilation" -> title

(if you don't want to use this patch, I suppose you could abuse the composer field).

Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Creating custom Tagcache query?
« Reply #39 on: November 12, 2006, 02:17:18 PM »
Why not have TagCache include a counter of some sort, as songs are added, it increments the counter for each new "set".

Songs added during initiation get the value 0. Each time new songs are detected they get an incremented value, so if you add 50 songs to your player, when TC updates and sees them they all have value 1. Then 2, and so on. Recently added can either be all songs with the current value, or maybe the last X values.
Logged

Offline afruff23

  • Member
  • *
  • Posts: 171
Re: Creating custom Tagcache query?
« Reply #40 on: February 14, 2007, 12:19:15 AM »
Hehe, don't tell me. You're the knowledgeable developer. If you want, I could fill out the feature request.
Logged

  • 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.107 seconds with 14 queries.