Bug 263288 - Amarok not copying tracks to the correct ipod directory anymore
Summary: Amarok not copying tracks to the correct ipod directory anymore
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Unclassified
Component: Collections/iPod iPhone (show other bugs)
Version: 2.4-GIT
Platform: Compiled Sources Linux
: HI normal with 80 votes (vote)
Target Milestone: 2.4.1
Assignee: Amarok Developers
URL:
Keywords: regression
: 264460 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-16 03:27 UTC by Clint
Modified: 2011-12-20 11:05 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.5


Attachments
emerge-info (14.59 KB, text/plain)
2011-01-16 03:31 UTC, Clint
Details
ipod being plugged in (459.64 KB, text/plain)
2011-01-20 12:32 UTC, Clint
Details
ipod transfer music (83.38 KB, text/plain)
2011-01-20 12:32 UTC, Clint
Details
Output of udisks --dump (26.46 KB, text/plain)
2011-10-24 17:23 UTC, Stephan Johach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Clint 2011-01-16 03:27:42 UTC
Version:           2.4-GIT (using KDE 4.5.95) 
OS:                Linux

Since the new 'copy/transcode' options when transferring from a local collection to removable device, now when I choose to do a plain copy from collection to an ipod nano (5g) the files will copy and show up under the device in amarok (and also using file browser directly) - however what is actually happening is the files are being copied as regular mp3 files instead of being encypted with libgpod.



Reproducible: Always

Steps to Reproduce:
1. copy music from local collection to an ipod
2. browse the mounted ipod and observe the unencrypted files being copied to the ipod root dir, rather than iPod_Control/Music/



[IP-] [  ] media-libs/libgpod-0.8.0
Comment 1 Clint 2011-01-16 03:31:27 UTC
Created attachment 56069 [details]
emerge-info
Comment 2 Myriam Schweingruber 2011-01-16 17:00:37 UTC
Amarok doesn't do any encryption AFAIK. What is wrong apparently is the target directory. Also the 5th gen Nano is supported only with at least libgpod 0.8 onwards IIRC. Please check the version of yours.
Comment 3 Clint 2011-01-17 02:00:04 UTC
Well there is certainly a regression here because amarok has worked well with my same ipod since ~2.1. So yes it is copying music files to the wrong directory (the ipod rootfs instead of iPod_Control/Music/ AND it is not 'encrypting' or 'converting' the tracks to the ipod format which is something like: iPod_Control/Music/F01/BICB.mp3


As you can see I have libgpod-0.8.0 installed.

When configuring:

-- The following external packages were located on your system.
....
libgpod - Support Apple iPod audio devices
...

So support should be there. As I said this has happened since the new copy/transcode dialog introduced not long ago - well that's when i've noticed this regression.
Comment 4 Clint 2011-01-17 02:01:36 UTC
status change back to unconfirmed
Comment 5 Clint 2011-01-18 03:25:51 UTC
Still narrowing this down on my end,

I have just downgraded to libgpod-0.7.94 and rebuilt amarok to see if this behaviour is caused by the latest libgpod (the new version came out about the same time as problem began) - however I still get the same results - music copied to ipod root and is unable to be seen by/played from the ipod - however amarok can see and play it.

I thought it also might be my locale settings or a character encoding problem however that also does not seem to be the case.

I have checked out older GIT versions that were known to work - 2.2.0, 2.2.2, 2.3.0 and the like, however nothing older than I think 2.3.2 will build - the earlier versions I get a configure error - qtscriptgenerator missing (it certainly isn't and no rebuilding of helped), and version 2.2.2 build fails around 5%, versions 2.3.0 fails the build around 75%.

Running master I can compile amarok fine. It seems to me something unrelated is messed up in the git tree.

Please help me narrow this down further.
Comment 6 Clint 2011-01-18 03:46:17 UTC
Update, GTKpod works fine. So ruling out libgpod and very likely anything specifically related to my installation.

Will GDB show anything useful if I copy the tracks as I would normally?
Comment 7 Myriam Schweingruber 2011-01-19 11:02:59 UTC
Unlikely. What would help is to run Amarok from a konsole with the following options twice:

amarok -d --nofork

You need to run this twice in a row, as debugging is only enabled the first time and collected the second time. We would need the output when you are connecting the iPod and the part where you write to the iPod. Thanks a lot for the feedback.
Comment 8 Clint 2011-01-20 12:31:19 UTC
Alright, hopefully this is what you need. 

For this test, I switched off my external DB and removed my main collection - only leaving amarok with 1 album of music - lord finesse - in my collection which I then copied onto the ipod.

It may or may not be related, however around the same time this happened it also takes much much longer for amarok to be able to list my song count/collection. The ipod shows up in the amarok windows, however will take ~2-3 mins to actually be able to see the music on it. 

You should find attached 2 files, one is stdout & stderr when plugging in the ipod, and the second is the output of transferring the album onto the ipod.

When copying the album, in the copy/transcode dialog I manually have selected the music to be transferred into the iPod_Control/Music dir - leaving it default does basically the same thing except it dumps the music to the ipod root.

This is the dir listing after the 2 logs:

ls -la /media/GIBBO\'S\ POD/iPod_Control/Music/
total 304
drwx------ 19 clint users 16384 Jan 20 21:18 .
drwx------  9 clint users 16384 Mar  2  2010 ..
drwx------  2 clint users 16384 Jan 18 12:39 F00
drwx------  2 clint users 16384 Jan 15 10:07 F01
drwx------  2 clint users 16384 Jan 18 12:39 F02
drwx------  2 clint users 16384 Jan 18 12:38 F03
drwx------  2 clint users 16384 Jan 18 12:39 F04
drwx------  2 clint users 16384 Jan 18 12:39 F05
drwx------  2 clint users 16384 Jan 18 12:39 F06
drwx------  2 clint users 16384 Jan 18 12:39 F07
drwx------  2 clint users 16384 Jan 18 12:39 F08
drwx------  2 clint users 16384 Jan 18 12:38 F09
drwx------  2 clint users 16384 Jan 18 12:38 F10
drwx------  2 clint users 16384 Jan 18 12:38 F11
drwx------  2 clint users 16384 Jan 18 12:39 F12
drwx------  2 clint users 16384 Jan 15 10:07 F13
drwx------  3 clint users 16384 Jan 20 21:18 Lord_Finesse


and descending into the album folder:

ls -la /media/GIBBO\'S\ POD/iPod_Control/Music/Lord_Finesse/The_Awakening/
total 73088
drwx------ 2 clint users   16384 Jan 20 21:18 .
drwx------ 3 clint users   16384 Jan 20 21:18 ..
-rw-r--r-- 1 clint users 3261630 May  5  2009 01_Da_Sermon_(Intro).mp3
-rw-r--r-- 1 clint users 1977660 May  5  2009 02_Time_Ta_Bounce_(Featuring_Doo_Wop_of_Da_Bounce_Squad).mp3
-rw-r--r-- 1 clint users 6765591 May  5  2009 03_True_And_Livin'.mp3
-rw-r--r-- 1 clint users 1982048 May  5  2009 04_O_Lord_(Featuring_O.C.).mp3
-rw-r--r-- 1 clint users 6864020 May  5  2009 05_Brainstorm-P.S.K._(No_Gimmicks_Remix)_(Featuring_KRS-One_and_O.C.).mp3                                                                                               
-rw-r--r-- 1 clint users 1598362 May  5  2009 06_Taking_It_Lyte_(Featuring_MC_Lyte).mp3
-rw-r--r-- 1 clint users 7443440 May  5  2009 07_Gameplan.mp3
-rw-r--r-- 1 clint users 2262917 May  5  2009 08_Words_From_Da_Ak_(Featuring_Akinyele).mp3
-rw-r--r-- 1 clint users 5352471 May  5  2009 09_Flip_Da_Style.mp3
-rw-r--r-- 1 clint users 1545072 May  5  2009 10_Showtime_(Featuring_Showbiz).mp3
-rw-r--r-- 1 clint users 7095361 May  5  2009 11_Speak_Ya_Peace_(Featuring_Marquee,_Diamond,_+_A.G.).mp3
-rw-r--r-- 1 clint users 5874084 May  5  2009 12_Food_For_Thought.mp3
-rw-r--r-- 1 clint users 1090541 May  5  2009 13_Da_Kid_Himself_(Featuring_Kid_Capri).mp3
-rw-r--r-- 1 clint users 5838349 May  5  2009 14_Hip_2_Da_Game.mp3
-rw-r--r-- 1 clint users 8308487 May  5  2009 15_No_Gimmicks_(Featuring_KRS-One).mp3
-rw-r--r-- 1 clint users 7420742 May  5  2009 16_Actual_Facts_(Featuring_Sadat_X,_Large_Professor,_&_Grand_Puba).mp3
Comment 9 Clint 2011-01-20 12:32:08 UTC
Created attachment 56225 [details]
ipod being plugged in
Comment 10 Clint 2011-01-20 12:32:43 UTC
Created attachment 56226 [details]
ipod transfer music
Comment 11 Myriam Schweingruber 2011-01-24 12:01:15 UTC
Thank you for the feedback.
Comment 12 Clint 2011-02-09 01:58:25 UTC
Can anyone replicate & confirm this?
Comment 13 gaelic 2011-02-09 14:25:33 UTC
Hi.

I can confirm and replicate this Bug.
Using archlinux with amarok-2.4.0-2 & libgpod-0.8.0-1

It's quite a pain in the ass at the moment ;)
Comment 14 Myriam Schweingruber 2011-02-09 14:37:45 UTC
A confirmation needs to be done with the same version or a later one.
Comment 15 Cleus 2011-02-09 18:00:11 UTC
Confirm with amarok-2.4-GIT, amarok-2.3.2-r1, libgpod-0.8.0, 1ibgpod-0.7.94.
Сompletely coincides with the message Clint.
Comment 16 Myriam Schweingruber 2011-02-10 13:02:25 UTC
Thank you for the feedback.
Comment 17 Myriam Schweingruber 2011-02-25 09:37:44 UTC
*** Bug 264460 has been marked as a duplicate of this bug. ***
Comment 18 Ian 2011-02-25 13:15:04 UTC
I reported bug 264460 which has been marked as a duplicate of this.
I've played around a bit more and found that in my case this seems to be an upgrade issue - deleting the music & the database and importing the music into an empty database from scratch has fixed all my problems except thatthe cover art isn't copied over.
I'm using a 2nd gen ipod nano and have libgpod libgpod4-0.7.95-100.pm.101.2 on both my opensuse 11.3 systems (from Packman repository).
Comment 19 Lorenzo Riano 2011-03-04 15:58:48 UTC
I can confirm with Amarok 2.40 using KDE 4.4.5 on Kubuntu 10.04 I can't transfer any file to my Ipod Video 160GB. Every time it complains that the device already has these tracks. The same problem was not present with the previous version of Amarok (2.3).
Comment 20 Giacomo 2011-03-14 09:22:58 UTC
I can confirm all of these problems.

amarok 2.3.2-r1 or 2.4.0
libgpod 0.8.0
libimobiledevice 1.0.4 (also tried 1.0.2)

It used to work before, I don't know, maybe the upgrade to 
kde 4.6.1...

Giacomo, Italy
Comment 21 Daniel 2011-03-19 12:53:19 UTC
I can confirm the problems with 
amarok-2.4.0-2 & libgpod-0.8.0-1
amarok-2.4.0-1 & libgpod-0.8.0
amarok-2.4-GIT & libgpod-0.8.0-1

I also had the idea that it might be kde 4.6.1 or more precisely the depreciation of HAL..there for I installed and started HAL, attached my ipod and started amarok...the problem remains. So it doesn't seem to be HAL.
Comment 22 georg 2011-03-20 15:12:02 UTC
There is a workaround I found a workaround here:  
http://forum.kde.org/viewtopic.php?f=115&t=93018&start=15

Deleting files and transfering covers does still not work, but at least i am able to copy files.
Comment 23 Clint 2011-03-21 08:56:46 UTC
Can someone post this patch submitted to amarok?

This has been itchin' me for months now, i'd love to test it.
Comment 24 Myriam Schweingruber 2011-03-21 11:43:26 UTC
Clint, please read that forum thread again, there is no patch in there, but a workaround, in particular this message: 
http://forum.kde.org/viewtopic.php?f=115&t=93018&start=15#p192155
Comment 25 Giacomo 2011-03-21 12:02:04 UTC
The workaround proposed 

http://forum.kde.org/viewtopic.php?f=115&t=93018&start=15#p192155

does not work for me.

The mount point under /media now begins with iPod but no way.

Tried to rebuild gvfs and rhythmbox with hal enabled to test whether 
it works, but same behaviour also for rhythmbox.

cat /etc/udev/rules.d/91_ipod.rules 
ENV{ID_FS_UUID}=="12BB-1B48", ENV{ID_FS_LABEL} ="iPod", ENV{ID_FS_LABEL_ENC} = "iPod"

WHERE "12BB-1B48" is taken from the output of 
 udevadm info --export-db

Giacomo.
Comment 26 Cleus 2011-03-26 14:57:03 UTC
Works! Gentoo, KDE 4.6.41, amarok 2.4-GIT.
Comment 27 Edney Matias 2011-04-06 13:10:36 UTC
I can confirm. I'm running kde sc 4.6.1 with amarok 2.4.0 on top of an updated Fedora 15 Alpha. I have libimobiledevice-1.1.0-2.fc15.i686, libmtp-1.0.5-2.fc15.i686 and libgpod-0.8.0-7.fc15.i686. I can't copy or remove files to and from my iPod Shuffle 2nd generation. 

If I connect and mount it with a running amarok it won't show up on collection panel. I have close and fire up amarok again. 

I'm using gtkpod for now but it's unable to keep the musics in the order they are organized. I could not test this case with amarok. 

The workaround of the forums didn't work for me. 

One more thing, when i use amarok or gtkpod to write files to the ipod (when
they work) i can't play them on random mode. I have to plug it on windows and reset to fresh state and then copy musics from there if i want them randomly played on the ipod.
Comment 28 Edney Matias 2011-08-12 12:37:54 UTC
It still don't work. Amarok now loads the full list of tracks on my iPod Shuffle but I can't remove or copy new tracks. I'm running Amarok 2.4.3 on a Fedora 15 with KDE SC 4.7 final. It also sometimes crashes when draging and droping musics from the collection to iPod. Very annoying. When it doesn't crash, i'm presented to the copy window. Clicking in ok supposedly Amarok to work, the cursor changes to a clock, but nothing is copied.
Comment 29 Matěj Laitl 2011-10-20 12:50:10 UTC
I think the whole problem is that Amarok misidentifies your iPod as ordinary USB Mass Storage player. This can be easily recognised -  what icon does your iPod collection have in Amarok collection browser? An USB stick or an iPod?

Amarok running on new kdelibs depends on udisks (via KDE's solid) to correctly identify your iPod. Could you please (who still suffer from the problem) attach the output of `udisks --dump`? (or, do you still use hal?)
Comment 30 Stephan Johach 2011-10-24 17:21:22 UTC
Regarding comment#29
This seems to be the problem I have. The ipod is used as a normal usb stick (as the collection icon shows).
On the other hand the device notifier from kde shows an Ipod icon, when mounting. So i suspect this is something within amarok not working correctly.

I append my 'udisks --dump' output. The ipod is device sdb?.
Comment 31 Stephan Johach 2011-10-24 17:23:38 UTC
Created attachment 64841 [details]
Output of udisks --dump
Comment 32 Matěj Laitl 2011-10-24 23:09:21 UTC
Thanks for your input, Stephan, I'll need some more. :)

All need Amarok debugging output while the iPod is plugged, please:
1. unplug iPod
2. open Konsole, execute: amarok --debug
3. open main window, let it start
4. go to Konsole, clear scrollback and reset (Ctrl+Shift+X)
5. plug iPod, give a few seconds so that Amarok detects and and outputs some messages to Konsole
6. attach this output here (I've recently found that there is File → Save output is Konsole)
Comment 33 Matěj Laitl 2011-10-25 13:25:07 UTC
I think I've found it, everyone affected please test (if you're able to) https://git.reviewboard.kde.org/r/102966/ and report here or there whether it worked or not.

If it doesn't work, please post debugging output as described in comment #32.
Comment 34 Matěj Laitl 2011-10-25 20:36:57 UTC
Git commit 7fabe3a21f4bcb939516456a6ecb3d526584dc5d by Matěj Laitl.
Committed on 25/10/2011 at 14:59.
Pushed by laitl into branch 'master'.

iPod connection assistant: rework iPod identification

This should fix remaining bugs where iPod is misidentified as a USB
stick. Long comments are added that clarify interaction of varous
code paths that deal with iPhone-like devices.

BUG: 263288
REVIEW: 102966
FIXED-IN: 2.5

M  +1    -0    ChangeLog
M  +5    -1    src/MediaDeviceCache.cpp
M  +74   -43   src/core-impl/collections/ipodcollection/support/IpodConnectionAssistant.cpp

http://commits.kde.org/amarok/7fabe3a21f4bcb939516456a6ecb3d526584dc5d