[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amarok-bugs-dist
Subject:    [amarok] [Bug 332811] New: AFT tagger always recalculating a new tag in m4a/mp4 files
From:       <stefano.pettini () gmail ! com>
Date:       2014-03-30 14:12:32
Message-ID: bug-332811-71684 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=332811

            Bug ID: 332811
           Summary: AFT tagger always recalculating a new tag in m4a/mp4
                    files
    Classification: Unclassified
           Product: amarok
           Version: 2.8.0
          Platform: unspecified
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Collections/Local
          Assignee: amarok-bugs-dist@kde.org
          Reporter: stefano.pettini@gmail.com
                CC: matej@laitl.cz, ralf-engels@gmx.de

Basically for m4a/mp4 files the tag is inserted but it's not
recognized if the tool runs again. So the file is modified and a possibly-new
tag is rewritten.

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 ...

Reproducible: Always

Steps to Reproduce:
1. File a m4a file.
2. Run the aft tagger on it, in verbose mode.
3. Run the aft tagger on it, on and on again.
Actual Results:  
The AFT tag is added/replaced all the times.

Expected Results:  
The AFT tag should be added only during the first run, and the file should not
be modified anymore.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Amarok-bugs-dist mailing list
Amarok-bugs-dist@kde.org
https://mail.kde.org/mailman/listinfo/amarok-bugs-dist
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic