https://bugs.kde.org/show_bug.cgi?id=458662
Bug ID: 458662
Summary: Leading zeros are interpreted as octal numbers in
"fromtag '%{disk}'" in kid3-cli
Product: kid3
Version: 3.9.x
Platform: Other
OS: Other
Status: REPORTED
Severity: minor
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
Leading zeros are interpreted as octal numbers in "fromtag '%{disk}'".
I have only observed this when first having set the %{disk} tag to the value
"09" and then trying to create the filename using this tag.
STEPS TO REPRODUCE
1. Have a file "2009_42_Good Artist_Good Song.m4a". This is meant to be like
"%{year}_%{track}_%{artist}_%{title}.m4a"
2. Use the following commands
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]+%{disk}(.*)'" \
-c "fromtag '%{disk}-%{track} %{title}'" \
-c "save"
OBSERVED RESULT
This will
a) read the tags %{year}, %{track}, %{artist}, %{title} from the filename,
b) then set the tag %{disk} to "09/99", based on the %{year}, this is meant to
be the 9th disk out of 99 disks,
c) set the filename to "0-99-42 Good Song.m4a"
EXPECTED RESULT
The filename should be "9-99-42 Good Song.m4a"
Well, despite the fact that I do not know to make it more clever, because I
ideally wanted a filename "09-42 Good Song.m4a", it looks like the disk number
"09" is interpreted as octal, hence is invalid and replaced by a "0" (zero).
SOFTWARE/OS VERSIONS
macOS: 11.6.8 (Big Sur)
Qt Version: 6.3.1
ADDITIONAL INFORMATION
kid3-cli was installed 29.Aug.2022 using homebrew (http://brew.sh)
--
You are receiving this mail because:
You are watching all bug changes.