Error when copying tracks to devices

Nikolaj Hald Nielsen nhnfreespirit at gmail.com
Mon Aug 10 15:21:14 CEST 2009


Whoops, I need to disable that gmail "send" hotkey as I sometimes hit
it by accident.

This one is mostly for xevix.

When trying to copy tracks directly from a CD to my mtp device, I ran
into some issues.

First of all I got a crash due to missing checks for existing
composers and such that I have fixed. There is a much deeper issue
though.

When copying tracks to a device, the MediaDeviceHandler relies on the
playable urls of the tracks as the source. This is _wrong_.

The MediaDeviceCollectionLocation::copyUrlsToCollection( const
QMap<Meta::TrackPtr, KUrl> &sources ) function is called by the
LocationCollection frameworks and contains a map of the actual tracks
and their KIO copyable urls. As the url used for copying can
potentially be very different from the one used for playback (as in
the case of the audiocd collection) it is important to use these urls
and not just the playableUrls of the tracks.

I tried fixing this issue myself, but the use of the playable url
direclt is pretty ingrained in the MediaDevice stuff, so I gave up for
fear of messing up too many other things in the process...

- Nikolaj


More information about the Amarok-devel mailing list