Bug 127776 - "Move Files to Collection" - stats are gone
Summary: "Move Files to Collection" - stats are gone
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (show other bugs)
Version: 1.4-SVN
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-21 18:43 UTC by camico
Modified: 2006-12-28 18:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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