[kid3] [Bug 458662] Leading zeros are interpreted as octal numbers in "fromtag '%{disk}'" in kid3-cli

2022-09-21 Thread Urs Fleisch
https://bugs.kde.org/show_bug.cgi?id=458662

Urs Fleisch  changed:

   What|Removed |Added

 Resolution|--- |NOT A BUG
 Status|REPORTED|RESOLVED

-- 
You are receiving this mail because:
You are watching all bug changes.

[kid3] [Bug 458662] Leading zeros are interpreted as octal numbers in "fromtag '%{disk}'" in kid3-cli

2022-09-03 Thread Andreas Tusche
https://bugs.kde.org/show_bug.cgi?id=458662

--- Comment #2 from Andreas Tusche  ---
Understood. You solved my use case problem. And many thanks for that.

Anyhow, you may still want to look into the code, if you could avoid having
numbers with leading zeroes interpreted as octal.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kid3] [Bug 458662] Leading zeros are interpreted as octal numbers in "fromtag '%{disk}'" in kid3-cli

2022-09-03 Thread Urs Fleisch
https://bugs.kde.org/show_bug.cgi?id=458662

--- Comment #1 from Urs Fleisch  ---
Try this

kid3-cli \
-c "select [12][90][0-9][0-9]_[0-9][0-9]_*" \
-c "totag '%{year}_%{track}_%{artist}_%{title}'" \
-c "import tagsel '%{year}/99' '[12][90]%{discnumber}(.*)'" \
-c "fromtag '%{discnumber.2}-%{track} %{title}'"

I removed a + from the regexp because it would "eat" too much characters. Then
I used discnumber instead of disk because this is the "unified" frame name and
will also work for other formats than m4a. Finally using %{discnumber.2} will
give the number without the total.

-- 
You are receiving this mail because:
You are watching all bug changes.