Bug 215124

Summary: [PATCH] Transfering tracks to ipod 6th gen. corrupts track lengths for some reason
Product: [Applications] amarok Reporter: tomas.plesek
Component: Collections/iPod iPhoneAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: aikawarazuni, dave, hakan, matej, nhn, redm, sasha, teuf
Priority: NOR    
Version: 2.2.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: untested patch which should fix this bug

Description tomas.plesek 2009-11-18 15:47:40 UTC
Version:           2.2.1 (using KDE 4.3.3)
OS:                Linux
Installed from:    Ubuntu Packages

When you try to copy an album from your local collection (in other word right-click an album, select copy to collection -> ipod), track lenghts of copied files get corrupted (presumably something with itunesDB). 
So for example I've copied file X with track length of 3:21, however on the ipod the track "has" something like 6:45:00 (six hours). Albeit the ipod properly detects the end of file without any hitch, it is unpleasant as you cannot properly seek in such files. 
Note that those bad track lengths are visible even in amarok right after successful copy. On version 2.2.0, this never ocured, after upgrade to 2.2.1, I can always reproduce this behavior.
Comment 1 sasha 2009-11-20 04:05:30 UTC
Just adding myself to CC list. I have the same problem with the same Amarok version  - it is as if I wrote original report.
Comment 2 Myriam Schweingruber 2009-11-27 11:01:03 UTC
Confirmed by this forum post: http://forum.kde.org/viewtopic.php?f=115&t=84096&start=0
Comment 3 Christophe Fergeau 2009-11-27 11:19:52 UTC
Created attachment 38634 [details]
untested patch which should fix this bug

By reading the source, I think this patch should fix the bug. If not, there's a discrepancy between libSetLength and libGetLength which need to be looked at.
Comment 4 Myriam Schweingruber 2009-11-27 12:19:42 UTC
Thank you for the patch, Christophe. Could you please make a merge request on Gitorious so our developers can evaluate it? You can find a nice tutorial on how to do so here:
http://techbase.kde.org/Getting_Started/Sources/KDE_git-tutorial#Patch_Contributors
Comment 5 Michael Reiher 2009-11-28 16:44:09 UTC
I can confirm that this fixes the problem for me.
Comment 6 Nikolaj Hald Nielsen 2009-12-04 10:25:56 UTC
commit 49e692f8e1538ca54b2cc20e28801445cb9794bf
Author: Nikolaj Hald Nielsen <nhnFreespirit@gmail.com>
Date:   Fri Dec 4 10:21:18 2009 +0100

    Fix length of tracks copied to iPod.
    Thanks to Christophe Fergeau <teuf@gnome.org> for the patch
    BUG: 215124


I have no iPod so cannot test this directly. Please verify the fix!
Comment 7 Dave 2009-12-15 17:45:54 UTC
Just to confirm:  I have a 5.5 Gen 80G Black iPod (A450) and was experiencing the same problem.  The above patch DOES resolve the track length issue for me.
Comment 8 Nikolaj Hald Nielsen 2009-12-16 09:48:32 UTC
Thanks for confirming the fix Dave! :-) 
This fix is included in the just released Amarok 2.2.2 beta
Comment 9 Myriam Schweingruber 2009-12-17 20:51:17 UTC
*** Bug 219097 has been marked as a duplicate of this bug. ***
Comment 10 Hakan Bayindir 2009-12-18 00:08:57 UTC
I confirm that the patch also fixes the problem for 2nd generation iPod nano.