Summary: | When deleting newly copied tracks from media devices, Amarok tries to delete files in local collection | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Hakan Bayindir <hakan> |
Component: | Collections/Media Devices | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | aumuell, dev+kde |
Priority: | NOR | ||
Version: | 2.3.1-GIT | ||
Target Milestone: | 2.4.0 | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.4 | |
Sentry Crash Report: |
Description
Hakan Bayindir
2010-05-26 19:20:24 UTC
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() ) { |