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
translations translations
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
| | |-+  Adding search keys to the Database Search sub menu
« previous next »
  • Print
Pages: [1]

Author Topic: Adding search keys to the Database Search sub menu  (Read 238 times)

Offline iPodVT

  • Member
  • *
  • Posts: 497
Adding search keys to the Database Search sub menu
« on: June 21, 2025, 10:29:07 PM »
I'm trying to add the ability to search for Disc Number and Disc Total in my Database Search sub menu.  After looking at the Tagcache Database Format page in the Rockbox Wiki [https://www.rockbox.org/wiki/TagcacheDBFormat.html] I tried adding the following line to the "Search by..." sub menu code in my tagnavi_user.config file:

"Disc Number" -> discnumber ? discnumber = "" -> album -> title = "fmt_title"

but apparently Rockbox didn't like that because it didn't show up in my menu when I relaunched.  Then I changed discnumber (which is what is specified on the Tagcache Database Format page) to discnum (which is the label displayed by the Show Track Info screen when that tag is present in a track file) and it worked.  So I think that wiki page probably needs to be corrected/updated.

Now my question is:  Is there an ID3 tag search key that will work for finding the Disc Total for a track file (e.g. the '3' in Disc 1 of 3)?  I don't see a spec for it on the Tagcache Database Format page and it doesn't get displayed by the Show Track Info screen so I'm guessing (but hoping I'm wrong) that it isn't currently getting cached in the database.

Thanks.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 497
Re: Adding search keys to the Database Search sub menu
« Reply #1 on: June 22, 2025, 12:34:07 AM »
I have to partially correct m
Quote from: iPodVT on June 21, 2025, 10:29:07 PM
Now my question is:  Is there an ID3 tag search key that will work for finding the Disc Total for a track file (e.g. the '3' in Disc 1 of 3)?  I don't see a spec for it on the Tagcache Database Format page and it doesn't get displayed by the Show Track Info screen so I'm guessing (but hoping I'm wrong) that it isn't currently getting cached in the database.

It turns out that some tracks in my music library are in fact showing "[Discnum] 1/3" in the Show Track Info screen while others that have both a Disc Number and a Disk Total in their ID3 tags are only showing "[Discnum] 1".  So it does seem to indicate that Rockbox is at least sometimes caching a Disk Total value in the database.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 497
Re: Adding search keys to the Database Search sub menu
« Reply #2 on: June 22, 2025, 12:57:27 AM »
Initial observations are indicating that the tracks whose Disk Total tags are getting displayed are all mp3s that were encoded with early versions of iTunes (v2.0.4 and v4.7.1), and the tracks whose Disk Total tags are not getting displayed are all AACs that were encoded with later versions of iTunes (v12.8.3.1).
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 673
Re: Adding search keys to the Database Search sub menu
« Reply #3 on: June 22, 2025, 08:08:11 AM »
Quote from: iPodVT on June 22, 2025, 12:57:27 AM
Initial observations are indicating that the tracks whose Disk Total tags are getting displayed are all mp3s that were encoded with early versions of iTunes (v2.0.4 and v4.7.1), and the tracks whose Disk Total tags are not getting displayed are all AACs that were encoded with later versions of iTunes (v12.8.3.1).

Use something like 'exiftool' to dump the tags of those files.  That will be informative.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 497
Re: Adding search keys to the Database Search sub menu
« Reply #4 on: June 22, 2025, 09:06:20 AM »
Quote from: speachy on June 22, 2025, 08:08:11 AM
Use something like 'exiftool' to dump the tags of those files.  That will be informative.

Thanks for that suggestion.

In the meantime I have done a brute force visual survey of Show Track Info screens for dozens and dozens and dozens of tracks, and what I have observed so far has been 100% consistent.

With MP3s and AIFFs:
"[Tracknum] x/n" is always displayed.
"[Discnum] x/n" is always displayed if Disc Number and Disc Total are present in the track's ID3 tags.

With AACs and ALACs:
"[Tracknum] x/n" is never displayed - it's always "[Tracknum] x".
"[Discnum] x/n" is never displayed.  If Disc Number and Disc Total are present in the track's ID3 tags, only "[Discnum] x" is displayed.

I don't think I have any WAVs or FLACs in my music library, but that raises the question:  Does Rockbox recognize additional ID3 Tag search keys beyond those that are specified on the Tagcache Database Format page?  In my first post I was looking for something for Disc Total.  Now I'm also looking for something for File Format.  I know that I could search file names for ".wav" or ".m4a", but ".m4a" is used for both AAC and ALAC (which leads me to believe that Rockbox is getting and caching a File Type tag from the track file and not just using the file's extension).

Again, thanks.
Logged

Offline bahus

  • Member
  • *
  • Posts: 218
Re: Adding search keys to the Database Search sub menu
« Reply #5 on: June 22, 2025, 09:40:33 AM »
If I remember correctly, rockbox doesn't parse discs count tag at all. If you see Disc Number "1/2" - it comes right from metadata and displayed as is.
« Last Edit: June 22, 2025, 09:43:33 AM by bahus »
Logged

Offline bahus

  • Member
  • *
  • Posts: 218
Re: Adding search keys to the Database Search sub menu
« Reply #6 on: June 27, 2025, 06:24:18 AM »
Quote from: iPodVT on June 22, 2025, 09:06:20 AM
With AACs and ALACs:
"[Tracknum] x/n" is never displayed - it's always "[Tracknum] x".
"[Discnum] x/n" is never displayed.  If Disc Number and Disc Total are present in the track's ID3 tags, only "[Discnum] x" is displayed.
This one should be addressed with https://gerrit.rockbox.org/r/c/rockbox/+/6607

And I double checked - there is no dedicated field in metatdata for discs total field (and disc_string with "x/n" is not exposed to tag cache too) so no way to search it.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 497
Re: Adding search keys to the Database Search sub menu
« Reply #7 on: June 27, 2025, 10:58:46 AM »
Quote from: bahus on June 27, 2025, 06:24:18 AM
Quote from: iPodVT on June 22, 2025, 09:06:20 AM
With AACs and ALACs:
"[Tracknum] x/n" is never displayed - it's always "[Tracknum] x".
"[Discnum] x/n" is never displayed.  If Disc Number and Disc Total are present in the track's ID3 tags, only "[Discnum] x" is displayed.
This one should be addressed with https://gerrit.rockbox.org/r/c/rockbox/+/6607

Thanks very much for this.  I installed the current dev build a12d8e2171 and all looks good.

Quote from: bahus on June 27, 2025, 06:24:18 AM
And I double checked - there is no dedicated field in metatdata for discs total field (and disc_string with "x/n" is not exposed to tag cache too) so no way to search it.

And thanks, too, for clarifying this.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 497
Re: Adding search keys to the Database Search sub menu
« Reply #8 on: June 27, 2025, 11:00:40 PM »
I realize now that in my initial post in this topic I confused the usage of the term "discnumber" (which is the name of an ID3 tag in a track file) with the usage of the term "discnum" (which is apparently the abbreviated name that Rockbox uses for its storage of a discnumber datum in the database).

These terms are used on the wiki's Database page [https://www.rockbox.org/wiki/DataBase.html], on the wiki's Tagcache Database Format page [https://www.rockbox.org/wiki/TagcacheDBFormat.html], and in the Rockbox Manual, and perhaps other places as well, and I hadn't seen all of those references so I didn't get the distinction between them.  My apologies.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Adding search keys to the Database Search sub menu
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.048 seconds with 16 queries.