mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 16:02:07 +02:00
Fix loading of playlist updaters.
This commit is contained in:
parent
89088dd32d
commit
5575eb9e8e
@ -24,6 +24,7 @@
|
||||
#include "utils/Logger.h"
|
||||
#include "playlist/PlaylistUpdaterInterface.h"
|
||||
#include "utils/ImageRegistry.h"
|
||||
#include "accounts/AccountManager.h"
|
||||
|
||||
#include <QMetaObject>
|
||||
#include <QGenericArgument>
|
||||
@ -231,12 +232,25 @@ Collection::setPlaylists( const QList<Tomahawk::playlist_ptr>& plists )
|
||||
// qDebug() << "Batch inserting playlist:" << p->guid();
|
||||
m_playlists.insert( p->guid(), p );
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Collection::doLoadPlaylistUpdater( const playlist_ptr& p )
|
||||
{
|
||||
PlaylistUpdaterInterface::loadForPlaylist( p );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Collection::setAutoPlaylists( const QList< Tomahawk::dynplaylist_ptr >& plists )
|
||||
{
|
||||
|
@ -129,6 +129,7 @@ protected:
|
||||
|
||||
private slots:
|
||||
void onSynced();
|
||||
void doLoadPlaylistUpdater( const playlist_ptr& p );
|
||||
|
||||
private:
|
||||
bool m_changed;
|
||||
|
Loading…
x
Reference in New Issue
Block a user