Bug 137212 - Dynamic playlists can only repopulate from one source at a time
Summary: Dynamic playlists can only repopulate from one source at a time
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.3
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
: 127766 (view as bug list)
Depends on:
Reported: 2006-11-11 21:42 UTC by Max Cantor
Modified: 2006-11-13 01:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Max Cantor 2006-11-11 21:42:43 UTC
Version:           1.4.3 (using KDE 3.5.5, Kubuntu (edgy) 4:3.5.5-0ubuntu3)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17-10-386

If you designate more than one source for a Dynamic Playlist, it can only populate using songs from 1 source at a time when populating.  Maybe this is actually a feature request, but I feel like it should just draw from all sources, not just one at a time.
Comment 1 Alexandre Oliveira 2006-11-11 21:50:54 UTC
*** Bug 127766 has been marked as a duplicate of this bug. ***
Comment 2 Seb Ruiz 2006-11-13 01:15:16 UTC
SVN commit 604494 by seb:

Refactor of dynamic mode. This revised implementation solves a number of bugs. The logic of adding tracks from a dynamic mode is now delegated to the DynamicMode object, and is not done within the playlist. When a dynamic mode is loaded, a cache of 200 elements is create from the playlist sources. By caching a subset of the possible tracks to be inserted, there is no longer a requirement to execute complex SQL statements on each track change or playlist repopulation. Additionally, by grabbing random tracks from this cache, items are no longer fetched from just one source, but all of them. Once these cached tracks have been inserted into the playlist, they are removed from the cache list in order to avoid duplicating song insertions. Once the cache has been depleted, it is simply regenerated. 200 elements is approximately 12 hours worth of music, so the set should be sufficiently large to handle the user's requirements.

I've done quite a bit of regression testing, but the more the merrier :). The only feature which needs to be fixed is the Suggested mode of dynamic playlists, but this should be easily rectifiable.

BUG: 134159
BUG: 137212
BUG: 107693
BUG: 130542
BUG: 133269
BUG: 113120

 M  +233 -14   dynamicmode.cpp  
 M  +51 -6     dynamicmode.h  
 M  +12 -204   playlist.cpp  
 M  +3 -4      playlist.h  
 M  +1 -1      playlistbrowser.cpp