mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
Fix loading of playlist updaters.
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "playlist/PlaylistUpdaterInterface.h"
|
#include "playlist/PlaylistUpdaterInterface.h"
|
||||||
#include "utils/ImageRegistry.h"
|
#include "utils/ImageRegistry.h"
|
||||||
|
#include "accounts/AccountManager.h"
|
||||||
|
|
||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
#include <QGenericArgument>
|
#include <QGenericArgument>
|
||||||
@@ -231,12 +232,25 @@ Collection::setPlaylists( const QList<Tomahawk::playlist_ptr>& plists )
|
|||||||
// qDebug() << "Batch inserting playlist:" << p->guid();
|
// qDebug() << "Batch inserting playlist:" << p->guid();
|
||||||
m_playlists.insert( p->guid(), p );
|
m_playlists.insert( p->guid(), p );
|
||||||
if ( !m_source.isNull() && m_source->isLocal() )
|
if ( !m_source.isNull() && m_source->isLocal() )
|
||||||
PlaylistUpdaterInterface::loadForPlaylist( p );
|
{
|
||||||
|
if ( Tomahawk::Accounts::AccountManager::instance()->isReady() )
|
||||||
|
doLoadPlaylistUpdater( p );
|
||||||
|
else
|
||||||
|
NewClosure( Tomahawk::Accounts::AccountManager::instance(), SIGNAL( ready() ),
|
||||||
|
this, SLOT( doLoadPlaylistUpdater( playlist_ptr ) ), p );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
emit playlistsAdded( plists );
|
emit playlistsAdded( plists );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Collection::doLoadPlaylistUpdater( const playlist_ptr& p )
|
||||||
|
{
|
||||||
|
PlaylistUpdaterInterface::loadForPlaylist( p );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Collection::setAutoPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
Collection::setAutoPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
||||||
{
|
{
|
||||||
|
@@ -129,6 +129,7 @@ protected:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onSynced();
|
void onSynced();
|
||||||
|
void doLoadPlaylistUpdater( const playlist_ptr& p );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_changed;
|
bool m_changed;
|
||||||
|
Reference in New Issue
Block a user