Bug 268739

Summary: Dynamic Collection broken again
Product: [Applications] amarok Reporter: Peter C. Ndikuwera <pndiku>
Component: Collections/LocalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: bugs.kde.org, mitchell, ralf-engels
Priority: NOR    
Version: 2.4-GIT   
Target Milestone: 2.4.1   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 2.4.1

Description Peter C. Ndikuwera 2011-03-17 11:31:16 UTC
Version:           2.4-GIT (using KDE 4.6.1) 
OS:                Linux

I have music on two drives, one local & one NFS.

When I unmount either of the drives and do an "Update Collection", all the entries in the "urls" table of my database that are on the unmounted drive are deleted.

Strangely, the entries in the "directories" table aren't.

Reproducible: Always

Steps to Reproduce:
1) Mount any two drives, either locally, USB or Remote.
2) Add directories to the collection
3) Scan
4) Unmount one of the drives (let's call it Drive 2)
5) "Update Collection"
6) Remount the drive



Actual Results:  
All the music on Drive 2 has disappeared.

Expected Results:  
Music on Drive 2 should have been 're-enabled'
Comment 1 Peter C. Ndikuwera 2011-03-17 20:19:04 UTC
Git commit 89635d1df5891033283da924fc55dae36ee868e2 by Peter C. Ndikuwera.
Committed on 17/03/2011 at 20:12.
Pushed by pndiku into branch 'master'.

Fix Dynamic Collection/scanning of unmounted device

BUG: 268739

Ok, fixing my own bug report here. Collection Scanner should only scan
urls on mounted devices.

M  +9    -1    src/core-impl/collections/db/sql/SqlScanResultProcessor.cpp     

http://commits.kde.org/amarok/89635d1df5891033283da924fc55dae36ee868e2
Comment 2 Myriam Schweingruber 2011-03-19 12:50:04 UTC
*** Bug 268767 has been marked as a duplicate of this bug. ***
Comment 3 Tom Chiverton 2011-03-19 13:17:32 UTC
While I'm pleased the bug is being fixed, as this is a serious data loss issue, would an update for the current release note be a good plan, rather than risking more people loosing all their meta-data ?
That's basically the next worst thing to deleting the files themselves !

The patch to fix it seems small and well contained, so easy enough to roll out, no ?