mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
fix modifying playlist items would render dynamic playlists B0RKED
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "database/database.h"
|
||||
#include "database/databasecommand_playbackhistory.h"
|
||||
#include "dynamic/GeneratorInterface.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -337,7 +338,14 @@ PlaylistModel::onPlaylistChanged( bool waitForUpdate )
|
||||
|
||||
m_waitForUpdate = waitForUpdate;
|
||||
QString newrev = uuid();
|
||||
m_playlist->createNewRevision( newrev, m_playlist->currentrevision(), l );
|
||||
if( dynplaylist_ptr dynplaylist = m_playlist.dynamicCast<Tomahawk::DynamicPlaylist>() ) {
|
||||
if( dynplaylist->mode() == OnDemand )
|
||||
dynplaylist->createNewRevision( newrev );
|
||||
else if( dynplaylist->mode() == Static )
|
||||
dynplaylist->createNewRevision( newrev, dynplaylist->currentrevision(), dynplaylist->type(), dynplaylist->generator()->controls(), l );
|
||||
} else {
|
||||
m_playlist->createNewRevision( newrev, m_playlist->currentrevision(), l );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user