mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 17:14:00 +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/database.h"
|
||||||
#include "database/databasecommand_playbackhistory.h"
|
#include "database/databasecommand_playbackhistory.h"
|
||||||
|
#include "dynamic/GeneratorInterface.h"
|
||||||
|
|
||||||
using namespace Tomahawk;
|
using namespace Tomahawk;
|
||||||
|
|
||||||
@@ -337,7 +338,14 @@ PlaylistModel::onPlaylistChanged( bool waitForUpdate )
|
|||||||
|
|
||||||
m_waitForUpdate = waitForUpdate;
|
m_waitForUpdate = waitForUpdate;
|
||||||
QString newrev = uuid();
|
QString newrev = uuid();
|
||||||
|
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 );
|
m_playlist->createNewRevision( newrev, m_playlist->currentrevision(), l );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user