Version: 2.3.0.90 (using KDE 4.4.3) OS: Linux When deleting freshly copied tracks from a UMS media device such as USB flash disk, Amarok wants to delete files in the local collection, not on the flash disk. Reproducible: Always Steps to Reproduce: 1- Open Amarok 2- Plug your USB media device 3- Mount it, amarok will automount it. 4- If not auto-enabled, enabled your device as a collection. 5- Try to copy your favorite music to the device but fumble/disorient/etc. and include some other music which is not wanted. 6- After copying finishes, realize the situation and want to delete them from the media device by right clicking and selecting delete tracks. Actual Results: - Amarok asks for confirmation to remove files from your local collection, not from the media device (I'm not very adventurous to try clicking delete). Expected Results: - Amarok asks for confirmation to remove files from your media device and giving permission removed unwanted tracks from media device. Packages: Debian experimental OS: Linux (i686) release 2.6.32-3-686-bigmem Compiler: cc
I just confirmed this with 2.3.1-git on Debian Testing with KDE 4.4.5.
Setting status to confirmed.
indeed I can confirm this too: it's pretty bad. I'm not sure whom to CC for this.
commit d2bbcd7c9cb7562e744380420c08f84448733067 branch master Author: Sergey Ivanov <123kash@gmail.com> Date: Sun Jan 2 22:37:16 2011 +0300 Fixed issue with UMS Collection that made amarok to delete original track instead of newly copied one. BUG: 238915 diff --git a/ChangeLog b/ChangeLog index d1813d6..2d3beba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ VERSION 2.4-Beta 2 * Fixed some broken radio stream URLs. BUGFIXES: + * Fixed issue with UMS Collection that made amarok to delete original track + instead of newly copied one. (BR 238915) * Fixed issue with Audio CDs that do not provide CDDB information. Patch by Andriy Gapon <avg@icyb.net.ua>. (BR 257818) * Fixed issue with the Organize Files Dialog that prevented presets from being diff --git a/src/core-impl/collections/umscollection/handler/UmsHandler.cpp b/src/core-impl/collections/umscollection/handler/UmsHandler.cpp index be57c07..4535ae1 100644 --- a/src/core-impl/collections/umscollection/handler/UmsHandler.cpp +++ b/src/core-impl/collections/umscollection/handler/UmsHandler.cpp @@ -610,7 +610,6 @@ UmsHandler::findPathToCopy( const Meta::TrackPtr &srcTrack, const Meta::MediaDev bool UmsHandler::libCopyTrack( const Meta::TrackPtr &srcTrack, Meta::MediaDeviceTrackPtr &destTrack ) { - Q_UNUSED( destTrack ) DEBUG_BLOCK KUrl srcurl = KUrl::fromPath( srcTrack->playableUrl().path() ); @@ -692,8 +691,6 @@ UmsHandler::fileTransferred( KJob *job ) //SLOT void UmsHandler::slotCopyingDone( KIO::Job* job, KUrl from, KUrl to, time_t mtime, bool directory, bool renamed) { - Q_UNUSED( job ) - Q_UNUSED( to ) Q_UNUSED( mtime ) Q_UNUSED( directory ) Q_UNUSED( renamed ) @@ -705,6 +702,7 @@ UmsHandler::slotCopyingDone( KIO::Job* job, KUrl from, KUrl to, time_t mtime, bo { Meta::TrackPtr metafiletrack( new MetaFile::Track( to ) ); Meta::MediaDeviceTrackPtr destTrack = m_srctodest.value( track ); + destTrack->setPlayableUrl( to ); m_umstrackhash.insert( destTrack, metafiletrack ); m_files.insert( to.path(), destTrack ); slotFinalizeTrackCopy( track ); diff --git a/src/core/collections/CollectionLocation.cpp b/src/core/collections/CollectionLocation.cpp index b16b275..c5b07ac 100644 --- a/src/core/collections/CollectionLocation.cpp +++ b/src/core/collections/CollectionLocation.cpp @@ -156,7 +156,6 @@ CollectionLocation::prepareMove( Meta::TrackPtr track, CollectionLocation *desti void CollectionLocation::prepareMove( const Meta::TrackList &tracks, CollectionLocation *destination ) { - debug() << "prepare move"<<tracks.count()<<"tracks from"<<collection()->collectionId()<<"to"<<(destination->collection()?destination->collection()->collectionId():"no destination. probably trash"); DEBUG_BLOCK if( !destination->isWritable() ) {