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:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  %strip doesn't do anything in my tagnavi format declaration
« previous next »
  • Print
Pages: [1]

Author Topic: %strip doesn't do anything in my tagnavi format declaration  (Read 111 times)

Offline iPodVT

  • Member
  • *
  • Posts: 497
%strip doesn't do anything in my tagnavi format declaration
« on: June 30, 2025, 07:06:34 PM »
As part of my effort to tweak and refine my Database->Search->Title mod, I tried applying %strip to my tagnavi format declaration to see if/how I might be able to use it, with the hope that ultimately I might somehow be able to feed it the length of the album string.  But it doesn't seem to have any effect at all in the following declaration:

%format "fmt_title2" "%s • %02d.%s - %02d:%02d" album tracknum title Lm Ls %strip = "6"

Am I doing something incorrectly?

Thanks.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 497
Re: %strip doesn't do anything in my tagnavi format declaration
« Reply #1 on: June 30, 2025, 07:51:05 PM »
I found an old forum post from 2008 [https://forums.rockbox.org/index.php/topic,10771.msg139789.html#msg139789] that states that there might be a constant MAX_TAGS in the code that limits a declaration to having a maximum of five tags.  My declaration has five tags and they all get displayed properly without %strip, so it should be okay.  But I removed the last tag (:%02d and Ls) and now %strip is working, so four tags seems to be the limit for %strip (and also %sort and %limit) to work.

I can live without the Lm:Ls at the end of each line in the list of hits.  But what I really want now is to know if/how I can feed the length of the album string to %strip - that would make my life complete (for the rest of today, at least...).

Thanks.
Logged

Offline bahus

  • Member
  • *
  • Posts: 218
Re: %strip doesn't do anything in my tagnavi format declaration
« Reply #2 on: July 01, 2025, 02:11:18 AM »
I've already explained limitations of strip here maybe it's something related:
https://forums.rockbox.org/index.php/topic,54799.msg255841.html#msg255841

And regarding album name length. You can make it fixed length string. For example, %-10s limits string to 10 chars, padding with spaces on the right if needed:
Code: [Select]
%format "fmt_title2" "%-10s • %02d.%s - %02d:%02d" album tracknum title Lm Ls %strip = "13"
« Last Edit: July 01, 2025, 08:16:37 AM by bahus »
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 497
Re: %strip doesn't do anything in my tagnavi format declaration
« Reply #3 on: July 01, 2025, 03:52:58 AM »
First and foremost, thank you very much for your reply.  I really appreciate it.

Quote from: bahus on July 01, 2025, 02:11:18 AM
I've already explained limitations of strip here:
https://forums.rockbox.org/index.php/topic,54799.msg255841.html#msg255841

Yes, I saw that, but I don't believe that those limitations apply in my situation because I have only one declaration named "fmt_title2" and there are no conditionals in that declaration (or at least nothing that I recognize as a conditional).  In any case, with my declaration as it stands, $strip does nothing.  But if I reduce the number of tags to four or fewer, %strip works.  [edit: additional] So I will live without including Lm and Ls (mins:secs).

Quote from: bahus on July 01, 2025, 02:11:18 AM
And regarding album name length. You can make it fixed length string. For example, %-10s limits string to 10 chars, padding with spaces on the right if needed:
Code: [Select]
%format "fmt_title2" "%-10s • %02d.%s - %02d:%02d" album tracknum title Lm Ls %strip = "13"

This is the magic that I've been looking for - I'm now able to make my modified Title search work exactly the way I'd originally hoped.  Thank you, thank you, thank you!

But did you mean to combine %-10s with %strip = "13"?   Wouldn't it make more sense if both were 10 or both were 13 (or any number that is the same for both)?

In any case, I apologize for not finding this all in the documentation and figuring it out for myself.
« Last Edit: July 01, 2025, 04:15:39 AM by iPodVT »
Logged

Offline bahus

  • Member
  • *
  • Posts: 218
Re: %strip doesn't do anything in my tagnavi format declaration
« Reply #4 on: July 01, 2025, 04:30:54 AM »
Quote from: iPodVT on July 01, 2025, 03:52:58 AM
Wouldn't it make more sense if both were 10 or both were 13 (or any number that is the same for both)?

It depends on what you want to strip.
I've just added 3 addtional chars to strip to remove separator " • " after album name.  Just as example to your original string. But yeah it can be simplified to use the same number by removing separator:
Code: [Select]
%format "fmt_title2" "%-10s%02d.%s - %02d:%02d" album tracknum title Lm Ls %strip = "10"
And if you want to strip also track number (so removing "%-10s%02d.") it's again different numbers:
Code: [Select]
%format "fmt_title2" "%-10s%02d.%s - %02d:%02d" album tracknum title Lm Ls %strip = "13"
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 497
Re: %strip doesn't do anything in my tagnavi format declaration
« Reply #5 on: July 01, 2025, 04:38:47 AM »
Quote from: bahus on July 01, 2025, 04:30:54 AM
I've just added 3 addtional chars to strip to remove separator " • " after album name.  Just as example to your original string.

Ah, of course - got it.

Quote from: bahus on July 01, 2025, 04:30:54 AM
But yeah it can be simplified to use the same number by removing separator:
Code: [Select]
%format "fmt_title2" "%-10s%02d.%s - %02d:%02d" album tracknum title Lm Ls %strip = "10"

That's exactly what I've done.

Thanks for the clarification.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  %strip doesn't do anything in my tagnavi format declaration
 

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

Page created in 0.046 seconds with 17 queries.