Bug 173180 - Already existing playlists are added on every re-scan
Summary: Already existing playlists are added on every re-scan
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlists/Saved Playlists (show other bugs)
Version: 2.0-SVN
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-20 09:14 UTC by S. Burmeister
Modified: 2009-12-09 11:28 UTC (History)
2 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 S. Burmeister 2008-10-20 09:14:36 UTC
Version:           2.0 svn (using KDE 4.1.2)
OS:                Linux
Installed from:    SuSE RPMs

If one has playlists within the collection tree and re-scans the collection, they are added again, although they already exist in the playlist-pane. since they did not change, i.e. their filename, content, date and path is the same, they should not be added but skipped as "already existing".
Comment 1 Nikolaj Hald Nielsen 2008-10-20 09:27:09 UTC
I can confirm this
Comment 2 Nikolaj Hald Nielsen 2008-11-14 16:11:14 UTC
SVN commit 884294 by nhnielsen:

A ton of improvements to the SQL playlists ( the user playlists in the playlist browser )
1. Playlist generated from files during collection scanning now have a urlid, this is used to ensure that duplicates are not added when rescanning. Instead the playlist is recreated so any updates to the playlist file is reflected in the SQL playlist
2. Streams loaded from a playlist are now given propper title, album and artist values if no service recognizes them. This means that it now works well for keeping a list of, for instance, favorite books from the librivox service.
3. After a collection rescan, any SQL playlists generated or updated based on a playlist file would contain many tracks with no metata at all since the scanner did not give them any. Now a reload of the playlist is forced when it is subsequently used, 
giving collections a chance to add info about any tracks they know.

All this goodnes comes at a cost though. After this update, all old SQL playlists will be deleted ( no files are affected, only playlists stored in the database ). Any playlists based on files on disk can be recovered simply by rescanning the collection. If you 
have any custom made playlists that you care about, they can be added to the playlist and exported to a file ( and later readded ) _BEFORE_ this update is applied.

BUG: 173180 



 M  +3 -3      browsers/playlistbrowser/SqlPlaylistGroup.cpp  
 M  +60 -12    browsers/playlistbrowser/UserPlaylistModel.cpp  
 M  +1 -0      browsers/playlistbrowser/UserPlaylistModel.h  
 M  +57 -4     meta/SqlPlaylist.cpp  
 M  +2 -1      meta/SqlPlaylist.h  
 M  +3 -3      playlistmanager/PlaylistManager.cpp  
 M  +1 -1      playlistmanager/PlaylistManager.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=884294
Comment 3 S. Burmeister 2009-03-17 23:21:06 UTC
Rev: 940281, it happens again.
Comment 4 Mark Kretschmann 2009-04-21 09:01:21 UTC
Is this still valid with latest SVN?
Comment 5 Leo Franchi 2009-05-16 19:09:52 UTC
should have been fixed in svn recently by bart. re-open if not.