Bug 319084 - Amarok shows files from a deleted folderthat is not even in the Collection
Summary: Amarok shows files from a deleted folderthat is not even in the Collection
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (show other bugs)
Version: 2.7.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 2.8
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-29 19:19 UTC by greatperson
Modified: 2013-07-02 10:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.8


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description greatperson 2013-04-29 19:19:31 UTC
About a month ago, I placed a temporary folder with music on my Desktop. Amarok was configured to include $HOME into its Local Collection, so it scanned the folder. Then I deleted the folder but Amarok still show tracks from it in the Collection and shows unexistent paths in their Track Details.

The tracks cannot be «removed to Trash» from context menu.
The tracks can be deleted totally from context menu, but I don't want to manually do it manuallyfor all the collection checking for file path of every track.

I have tried rescanning the collection, removing $HOME from collection, restarting Amarok, restarting computer, upgrading Kubuntu and restarting Amarok again. :-) Nothing of these helps.

Reproducible: Always



Expected Results:  
All the deleted files from the folders which are not included in Collections should be removed from it.
Comment 1 Matěj Laitl 2013-07-01 21:48:55 UTC
Git commit e66883e92d3986eabe18be92c38311c7d3a232c4 by Matěj Laitl.
Committed on 01/07/2013 at 21:44.
Pushed by laitl into branch 'master'.

SqlRegistry: delete orphaned entries from the urls table, too

...in addition to removing other orphaned items. It sometimes happened
that an url entry with non-existent directory remained in the db, which
prevented SqlScanResultProcessor from cleaning it up properly.

BUGFIXES:
 * Fix a problem where ghost tracks would remain in the Local Collection
   until the database is wiped.
FIXED-IN: 2.8

M  +2    -0    ChangeLog
M  +8    -0    src/core-impl/collections/db/sql/DatabaseUpdater.cpp
M  +6    -0    src/core-impl/collections/db/sql/DatabaseUpdater.h
M  +4    -0    src/core-impl/collections/db/sql/SqlRegistry.cpp

http://commits.kde.org/amarok/e66883e92d3986eabe18be92c38311c7d3a232c4
Comment 2 greatperson 2013-07-02 05:29:20 UTC
Thank you very much, it looks similar to what I did manually on the database to solve the problem.
Comment 3 Matěj Laitl 2013-07-02 10:02:12 UTC
(In reply to comment #2)
> Thank you very much, it looks similar to what I did manually on the database
> to solve the problem.

Oh fine. You could have told that the problem may be url entries orphaned by directories, I've found it just by accident. :)