mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-15 10:33:59 +02:00
* Fixed updating result-hints for out-dated dynamic playlists.
This commit is contained in:
@@ -60,7 +60,7 @@ public:
|
|||||||
virtual void exec( DatabaseImpl* lib );
|
virtual void exec( DatabaseImpl* lib );
|
||||||
virtual void postCommitHook();
|
virtual void postCommitHook();
|
||||||
virtual bool doesMutates() const { return true; }
|
virtual bool doesMutates() const { return true; }
|
||||||
virtual bool groupable() const { return true; }
|
virtual bool groupable() const { return false; }
|
||||||
|
|
||||||
void setControlsV( const QVariantList& vlist )
|
void setControlsV( const QVariantList& vlist )
|
||||||
{
|
{
|
||||||
|
@@ -104,6 +104,7 @@ DatabaseCommand_SetPlaylistRevision::exec( DatabaseImpl* lib )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
tDebug() << "Playlist:" << m_playlistguid << m_currentRevision << source()->friendlyName() << source()->id();
|
||||||
throw "No such playlist, WTF?";
|
throw "No such playlist, WTF?";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -294,6 +294,7 @@ void
|
|||||||
Playlist::createNewRevision( const QString& newrev, const QString& oldrev, const QList< plentry_ptr >& entries )
|
Playlist::createNewRevision( const QString& newrev, const QString& oldrev, const QList< plentry_ptr >& entries )
|
||||||
{
|
{
|
||||||
tDebug() << Q_FUNC_INFO << newrev << oldrev << entries.count();
|
tDebug() << Q_FUNC_INFO << newrev << oldrev << entries.count();
|
||||||
|
Q_ASSERT( m_source->isLocal() || newrev == oldrev );
|
||||||
|
|
||||||
if ( busy() )
|
if ( busy() )
|
||||||
{
|
{
|
||||||
|
@@ -185,6 +185,8 @@ DynamicPlaylist::createNewRevision( const QString& newrev,
|
|||||||
const QList< dyncontrol_ptr>& controls,
|
const QList< dyncontrol_ptr>& controls,
|
||||||
const QList< plentry_ptr >& entries )
|
const QList< plentry_ptr >& entries )
|
||||||
{
|
{
|
||||||
|
Q_ASSERT( m_source->isLocal() || newrev == oldrev );
|
||||||
|
|
||||||
if ( busy() )
|
if ( busy() )
|
||||||
{
|
{
|
||||||
m_revisionQueue.enqueue( DynQueueItem( newrev, oldrev, type, controls, (int)Static, entries, oldrev == currentrevision() ) );
|
m_revisionQueue.enqueue( DynQueueItem( newrev, oldrev, type, controls, (int)Static, entries, oldrev == currentrevision() ) );
|
||||||
@@ -230,6 +232,8 @@ DynamicPlaylist::createNewRevision( const QString& newrev,
|
|||||||
const QString& type,
|
const QString& type,
|
||||||
const QList< dyncontrol_ptr>& controls )
|
const QList< dyncontrol_ptr>& controls )
|
||||||
{
|
{
|
||||||
|
Q_ASSERT( m_source->isLocal() || newrev == oldrev );
|
||||||
|
|
||||||
if ( busy() )
|
if ( busy() )
|
||||||
{
|
{
|
||||||
m_revisionQueue.enqueue( DynQueueItem( newrev, oldrev, type, controls, (int)OnDemand, QList< plentry_ptr >(), oldrev == currentrevision() ) );
|
m_revisionQueue.enqueue( DynQueueItem( newrev, oldrev, type, controls, (int)OnDemand, QList< plentry_ptr >(), oldrev == currentrevision() ) );
|
||||||
@@ -533,8 +537,15 @@ DynamicPlaylist::checkRevisionQueue()
|
|||||||
if ( item.oldRev != currentrevision() && item.applyToTip )
|
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
|
// 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 )
|
||||||
|
{
|
||||||
|
checkRevisionQueue();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
item.oldRev = currentrevision();
|
item.oldRev = currentrevision();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( item.mode == Static )
|
if( item.mode == Static )
|
||||||
createNewRevision( item.newRev, item.oldRev, item.type, item.controls, item.entries );
|
createNewRevision( item.newRev, item.oldRev, item.type, item.controls, item.entries );
|
||||||
else
|
else
|
||||||
|
@@ -20,11 +20,11 @@
|
|||||||
#include "tomahawkapp.h"
|
#include "tomahawkapp.h"
|
||||||
|
|
||||||
#include "thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
|
#include "thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
|
||||||
|
#include "ubuntuunityhack.h"
|
||||||
|
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
|
||||||
|
|
||||||
#include "ubuntuunityhack.h"
|
|
||||||
|
|
||||||
#ifdef Q_WS_MAC
|
#ifdef Q_WS_MAC
|
||||||
#include "tomahawkapp_mac.h"
|
#include "tomahawkapp_mac.h"
|
||||||
#include </System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/Headers/AppleEvents.h>
|
#include </System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/Headers/AppleEvents.h>
|
||||||
@@ -70,7 +70,6 @@ main( int argc, char *argv[] )
|
|||||||
a.init();
|
a.init();
|
||||||
|
|
||||||
QString locale = QLocale::system().name();
|
QString locale = QLocale::system().name();
|
||||||
|
|
||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
translator.load( QString( ":/lang/tomahawk_" ) + locale );
|
translator.load( QString( ":/lang/tomahawk_" ) + locale );
|
||||||
a.installTranslator( &translator );
|
a.installTranslator( &translator );
|
||||||
|
Reference in New Issue
Block a user