1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-25 02:09:48 +01:00

* Don't update playlist revision with result hints if it's already out of date.

This commit is contained in:
Christian Muehlhaeuser 2011-09-12 13:52:54 +02:00
parent 0e069c6b88
commit 0dbe87e2f4

View File

@ -372,6 +372,7 @@ Playlist::setRevision( const QString& rev,
{
// add initial tracks
createNewRevision( uuid(), currentrevision(), m_initEntries );
m_initEntries.clear();
}
else
emit revisionLoaded( pr );
@ -491,7 +492,6 @@ Playlist::onResolvingFinished()
{
if ( m_locallyChanged )
{
qDebug() << Q_FUNC_INFO;
m_locallyChanged = false;
createNewRevision( currentrevision(), currentrevision(), m_entries );
}
@ -578,14 +578,19 @@ Playlist::setBusy( bool b )
emit changed();
}
void
Playlist::checkRevisionQueue()
{
if ( !m_revisionQueue.isEmpty() )
{
RevisionQueueItem item = m_revisionQueue.dequeue();
if ( item.oldRev != currentrevision() && item.applyToTip ) // this was applied to the then-latest, but the already-running operation changed it so it's out of date now. fix it
{
if ( item.oldRev == item.newRev )
return;
item.oldRev = currentrevision();
}
createNewRevision( item.newRev, item.oldRev, item.entries );