Bug 127776

Summary: "Move Files to Collection" - stats are gone
Product: [Applications] amarok Reporter: camico
Component: Collections/LocalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.4-SVN   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description camico 2006-05-21 18:43:26 UTC
Version:           1.4-SVN (using KDE KDE 3.5.2)

File Browser -> Move Files to Collection -> track statistics are lost
However, the stats for the moved files are still present in the statistics table, with the obsolete source path. So I guess this path simply has to be updated, just like when "Organize Files" is used.
[Same for "Copy Files to Collection" probably]
Comment 1 Martin Aumueller 2006-07-22 14:55:11 UTC
This should be fixed for already quite some time - if not, please reopen.
Comment 2 camico 2006-09-09 17:59:31 UTC
no, just updated to svn, and it's still there. (just to clarify, i'm talking about files which are NOT in the collection, but which have been played and thus have scores and ratings, and then are moved or copied to a collection folder)
Comment 3 Martin Aumueller 2006-12-28 18:29:24 UTC
SVN commit 617291 by aumuell:

migrate statistics when moving files from outside to collection, too
BUG: 127776


 M  +2 -0      ChangeLog  
 M  +3 -3      src/collectiondb.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #617290:617291
@@ -87,6 +87,8 @@
     * Amarok now saves playlists with relative paths by default.
 
   BUGFIXES:
+    * Migrate statistics for files moved from outside to the collection.
+      (BR 127776)
     * Select All/Copy action would not copy from context browser. (BR 138635)
     * Xine-engine: When a track was fading out (after pressing Stop), and you
       started another track, Amarok could become unresponsive.
--- trunk/extragear/multimedia/amarok/src/collectiondb.cpp #617290:617291
@@ -4118,8 +4118,6 @@
 
     if( !m_fileOperationFailed )
     {
-        emit fileMoved( src, dest );
-
         if( copy )
         {
             MetaBundle bundle( dstURL );
@@ -4131,9 +4129,11 @@
         }
         else
         {
+            emit fileMoved( src, dest );
+            migrateFile( srcURL.path(), dstURL.path() );
+
             if( isFileInCollection( srcURL.path() ) )
             {
-                migrateFile( srcURL.path(), dstURL.path() );
                 return true;
             }
             else