<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>319084</bug_id>
          
          <creation_ts>2013-04-29 19:19:31 +0000</creation_ts>
          <short_desc>Amarok shows files from a deleted folderthat is not even in the Collection</short_desc>
          <delta_ts>2013-07-02 10:02:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>amarok</product>
          <component>Collections/Local</component>
          <version>2.7.0</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.8</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="greatperson">greatperson</reporter>
          <assigned_to name="Amarok Bugs">amarok-bugs-null</assigned_to>
          <cc>matej</cc>
    
    <cc>ralf-engels</cc>
          
          <cf_commitlink>http://commits.kde.org/amarok/e66883e92d3986eabe18be92c38311c7d3a232c4</cf_commitlink>
          <cf_versionfixedin>2.8</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1365019</commentid>
    <comment_count>0</comment_count>
    <who name="greatperson">greatperson</who>
    <bug_when>2013-04-29 19:19:31 +0000</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1380678</commentid>
    <comment_count>1</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-07-01 21:48:55 +0000</bug_when>
    <thetext>Git commit e66883e92d3986eabe18be92c38311c7d3a232c4 by Matěj Laitl.
Committed on 01/07/2013 at 21:44.
Pushed by laitl into branch &apos;master&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1380712</commentid>
    <comment_count>2</comment_count>
    <who name="greatperson">greatperson</who>
    <bug_when>2013-07-02 05:29:20 +0000</bug_when>
    <thetext>Thank you very much, it looks similar to what I did manually on the database to solve the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1380757</commentid>
    <comment_count>3</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-07-02 10:02:12 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Thank you very much, it looks similar to what I did manually on the database
&gt; to solve the problem.

Oh fine. You could have told that the problem may be url entries orphaned by directories, I&apos;ve found it just by accident. :)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>