Bug in AFT tagger and m4a/mp4 files

Stefano Pettini stefano.pettini at gmail.com
Sun Mar 30 13:21:02 UTC 2014


Hi,

let me quickly report a bug in the atf tagger skipping the account
creation in the KDE bug tracking system :-)

Basically for m4a/mp4 files the tag is inserted but it's not
recognized if the tool runs again.

Please see:

INFO: File is a MP4 file, opening...
INFO: Found an existing AFT identifier: ----:com.apple.iTunes:Amarok 2
AFTv1 - amarok.kde.org
INFO: AFT identifier is version -1
INFO: Upgrading AFT identifier from version -1 to version %2
INFO: Removing current AFT frame
INFO: Adding new field and saving file with UID:
2f348a8a6cc4fa16747521edfed28a2babcdabcdabcdabcdabcd
INFO: Safe-saving file
INFO: Cleaning up...
INFO: Processing file /home/xxx/Music/Test/Code 64/2003 - Storm/14 -
Without You (Spektron mix).m4a
INFO: Temporary file is at /home/xxx/Music/Test/Code 64/2003 -
Storm/14 - Without You (Spektron
mix).m4a.amarok-afttaggertemp.pid-10467.random-Z2TE3L1d.m4a

I had a look at the code, this is because we prefix the tag with
"----:com.apple.iTunes:". I don't understand the reason for this but I
assume there is a valid one.

However when we try to detect the version number, we blindly use the
char at position 13. This is valid only in case the tag name begins
with "AMAROK 2 AFT", but this is not the case for MP4 as it has the
iTunes prefix.

We should basically fix it by saving the output of:

            else if( ukey.find( "AMAROK 2 AFT" ) != -1 )

and adding it to that 13.

I haven't verified Amarok code, only the code of the aft tagger.

Minor thing: I also don't understand why the "%2" placeholder is not
replaced in the info message ...

Regards,
Stefano



More information about the Amarok mailing list