Bug 171418 - Dynamic playlist pick up files not in the collection anymore
Summary: Dynamic playlist pick up files not in the collection anymore
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlists/Dynamic Playlists (show other bugs)
Version: 2.1-SVN
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 174320 177274 177276 180205 193774 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-21 19:38 UTC by Mikko C.
Modified: 2009-12-09 11:29 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikko C. 2008-09-21 19:38:17 UTC
Version:           2.0-SVN (using 4.1.67 (KDE 4.1.67 (KDE 4.2 >= 20080918)), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.27-rc6

How to reproduce:

- Remove some files from the collection
- Update or Re-scan the collection
- Create a dynamic playlist and play it.

At some point it will pick the files that have been removed from the collection. Playback will stop as the track is reached.
Note that the Collection Browser *won't* show the files that have been removed!

To avoid this, I need to remove collection.db and then rescan.
Comment 1 Mikko C. 2008-09-26 20:43:38 UTC
Still present after the migration to mysqle.
Comment 2 Mikko C. 2008-10-18 18:13:44 UTC
Still valid with today's trunk.
Probably entries aren't removed from the database?
Comment 3 Mark Kretschmann 2008-10-18 18:51:41 UTC
This reminds me a lot of the problems Nightrose was having. CC'ing her.
Comment 4 Lydia Pintscher 2008-10-20 23:48:10 UTC
Might be related but as I said on the mailinglist it is different.
For me the files are outside of the collection and get picked up. They are definitely in my collection browser and get picked up by dynamic playlists.
Comment 5 Mikko C. 2008-11-22 16:02:45 UTC
Still perfectly reproducible with today's trunk.
With a *clean profile* I scanned a small part of my collection (10 albums).
Then I moved 5 albums out of the collection.
The collection browser is correctly updated, it doesn't show the albums I removed.
The dynamic playlist instead keeps picking those non-existent files.
Comment 6 Mark Kretschmann 2008-11-22 16:07:27 UTC
Is this a regression or was it always buggy?
Comment 7 Mikko C. 2008-11-22 16:10:33 UTC
I'm not sure, I opened this bug in September but I think I remember seeing it before then...
Isn't there a way to query the mysqle database to check if there's still some leftover from removed tracks?
Comment 8 Mark Kretschmann 2008-11-22 16:16:18 UTC
Yeah, start the Script Console script, and then just use it like that:

sql = Amarok.Collection.escape( "SELECT columns FROM tables" )
results = Amarok.Collection.query ( sql )

<click Execute>


(replace it with the right query, of course)
Comment 9 Daniel Caleb Jones 2008-11-23 03:58:53 UTC
Sorry about my slow response on this.

I commited a fix for 173776, but it seems this problem may be related. I'd appreciated if someone would check if this problem persists in the latest svn.
Comment 10 Mikko C. 2008-11-23 09:11:27 UTC
Daniel, you're back! :D
I checked yesterday and it's still present.
However it's not a dynamic playlist specific problem: it seems that the entries are not completely removed from the database, so the dynamic playlist still picks them.

sql = Amarok.Collection.escape( "SELECT dir FROM directories" ) 
results = Amarok.Collection.query ( sql ) 

will print also the directories that have been removed from the collection.

Someone should CC the right person.
Comment 11 Maximilian Kossick 2008-11-23 13:07:18 UTC
The database query in comment #10 is irrelevant for this bug.

A solution might be to drop the uid cache for dynamic playlists whenever a collection emits the updated() signal.
Comment 12 Lydia Pintscher 2008-11-23 14:03:20 UTC
*** Bug 174320 has been marked as a duplicate of this bug. ***
Comment 13 Frederik Schwarzer 2008-12-09 02:10:11 UTC
*** Bug 177274 has been marked as a duplicate of this bug. ***
Comment 14 Mark Kretschmann 2008-12-09 11:31:06 UTC
*** Bug 177276 has been marked as a duplicate of this bug. ***
Comment 15 Mikko C. 2008-12-11 22:52:00 UTC
Is there any update on this? :)
Comment 16 Dmitry Suzdalev 2009-01-06 14:53:19 UTC
Reproducable here on svn version from 05.01.2008. Steps to reproduce are the same: remove some files from music dir, rescan collection, turn on dynamic playlist => unexistant entries are inserted.
Comment 17 Mikko C. 2009-01-10 08:31:29 UTC
*** Bug 180205 has been marked as a duplicate of this bug. ***
Comment 18 Dan Meltzer 2009-02-03 01:17:10 UTC
*** Bug 180205 has been marked as a duplicate of this bug. ***
Comment 19 Mikko C. 2009-02-27 11:10:43 UTC
Any updates on this bug? :)
Comment 20 Matthijs Wolthers 2009-04-09 11:18:37 UTC
Isn't this a rather severe bug? It's bothered me for quite a while now as I use the dynamic playlists on a daily basis and I tend to add and remove music to/from my collection every once in a while. All the music I ever added gets placed into my playlists, so I have to manually remove them all the time. I'll try the workaround of removing collection.db but it would be great if someone actually tries looking at this bug. I think severity should be "major" because of the functionality being affected.
Comment 21 Mikko C. 2009-04-21 21:24:29 UTC
*** Bug 185483 has been marked as a duplicate of this bug. ***
Comment 22 optiluca@gmail.com 2009-05-03 21:10:22 UTC
Happening with the 2.1 beta over here, may I add it also manifests itself by simply dragging the "local collection" into the playlist pane.  The playlist is populated with all tracks ever present in the collection, even though they do not appear in the collection itself...
Comment 23 Mark Kretschmann 2009-05-23 16:33:17 UTC
*** Bug 193774 has been marked as a duplicate of this bug. ***
Comment 24 Andreas.Feldmann 2009-06-21 13:48:56 UTC
bump: this bug is also bugging me in version 2.0.2 in Ubuntu.
Comment 25 Matthijs Wolthers 2009-06-21 13:53:48 UTC
It seems that this bug has been resolved in version 2.1.1. Can others confirm this? I don't have any non-existing titles in my playlist anymore since my upgrade to the new version.
Comment 26 Mikko C. 2009-06-21 15:20:36 UTC
True, I can't see this anymore in 2.2-svn either.