mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43: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 postCommitHook();
|
||||
virtual bool doesMutates() const { return true; }
|
||||
virtual bool groupable() const { return true; }
|
||||
virtual bool groupable() const { return false; }
|
||||
|
||||
void setControlsV( const QVariantList& vlist )
|
||||
{
|
||||
|
@@ -104,6 +104,7 @@ DatabaseCommand_SetPlaylistRevision::exec( DatabaseImpl* lib )
|
||||
}
|
||||
else
|
||||
{
|
||||
tDebug() << "Playlist:" << m_playlistguid << m_currentRevision << source()->friendlyName() << source()->id();
|
||||
throw "No such playlist, WTF?";
|
||||
return;
|
||||
}
|
||||
|
@@ -294,6 +294,7 @@ void
|
||||
Playlist::createNewRevision( const QString& newrev, const QString& oldrev, const QList< plentry_ptr >& entries )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO << newrev << oldrev << entries.count();
|
||||
Q_ASSERT( m_source->isLocal() || newrev == oldrev );
|
||||
|
||||
if ( busy() )
|
||||
{
|
||||
|
@@ -185,6 +185,8 @@ DynamicPlaylist::createNewRevision( const QString& newrev,
|
||||
const QList< dyncontrol_ptr>& controls,
|
||||
const QList< plentry_ptr >& entries )
|
||||
{
|
||||
Q_ASSERT( m_source->isLocal() || newrev == oldrev );
|
||||
|
||||
if ( busy() )
|
||||
{
|
||||
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 QList< dyncontrol_ptr>& controls )
|
||||
{
|
||||
Q_ASSERT( m_source->isLocal() || newrev == oldrev );
|
||||
|
||||
if ( busy() )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
// 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();
|
||||
}
|
||||
|
||||
if( item.mode == Static )
|
||||
createNewRevision( item.newRev, item.oldRev, item.type, item.controls, item.entries );
|
||||
else
|
||||
|
@@ -20,11 +20,11 @@
|
||||
#include "tomahawkapp.h"
|
||||
|
||||
#include "thirdparty/kdsingleapplicationguard/kdsingleapplicationguard.h"
|
||||
#include "ubuntuunityhack.h"
|
||||
|
||||
#include <QTranslator>
|
||||
|
||||
|
||||
#include "ubuntuunityhack.h"
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
#include "tomahawkapp_mac.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();
|
||||
|
||||
QString locale = QLocale::system().name();
|
||||
|
||||
QTranslator translator;
|
||||
translator.load( QString( ":/lang/tomahawk_" ) + locale );
|
||||
a.installTranslator( &translator );
|
||||
|
Reference in New Issue
Block a user