mid3v2 mangles data before adding to ID3v2 tags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mutagen (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I can't add frame 'WXXX' to mp3 files; mid3v2 changes the frame name
and the frame value before writing to disk.
What I did:
$ mid3v2 --list-raw example.mp3
Raw IDv2 tag info for example.mp3
TDRC(
TALB(
TPE1(
TIT2(
$ mid3v2 -h
...
You can set the value for any ID3v2 frame by using '--' and then a frame ID.
For example:
mid3v2 --TIT3 "Monkey!" file.mp3
...
$ mid3v2 --WXXX "http://
What I expected:
$ mid3v2 --list-raw example.mp3
WXXX(
or
WXXX(
What I saw:
$ mid3v2 --list-raw example.mp3
WXXX(
When I use mutagen itself to read that frame I get:
>>> import mutagen
>>> f = mutagen.
>>> f.tags['WXXX']
KeyError: 'WXXX'
>>> f.tags['WXXX:']
WXXX(
>>> str(f.tags[
"[u'http://
I said "WXXX" not "WXXX:", and the value that mid3v2 stored was a string
of a one-item list of the actual string I told it to store.
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: python-mutagen 1.38-1
ProcVersionSign
Uname: Linux 4.13.0-25-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CurrentDesktop: XFCE
Date: Sat Mar 24 10:42:08 2018
Dependencies:
InstallationDate: Installed on 2016-06-05 (657 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitec
SourcePackage: mutagen
UpgradeStatus: Upgraded to artful on 2017-10-22 (153 days ago)
Changed in mutagen (Ubuntu): | |
status: | New → Fix Released |
I thought it might be because 'WXXX' is for freeform url data, so I used a more official frame 'WOAS'. The frame name wasn't munged, but the value was:
$ mid3v2 --WOAS 'https:/ /ubuntu. org' example.mp3 /ubuntu. org']
$ mid3v2 -l example.mp3
...
WOAS=[u'https:/
and when using mutagen directly:
>>> import mutagen File('example. mp3') /ubuntu. org']") /ubuntu. org']" /ubuntu. org']"
>>> f = mutagen.
>>> f.tags['WOAS']
WOAS(url="[u'https:/
>>> str(f.tags['WOAS'])
"[u'https:/
>>> f.tags['WOAS'].url
"[u'https:/