mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 17:43:59 +02:00
Remove SpotifyAccountFactory
This commit is contained in:
@@ -77,23 +77,6 @@ namespace {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Account*
|
|
||||||
SpotifyAccountFactory::createAccount( const QString& accountId )
|
|
||||||
{
|
|
||||||
return new SpotifyAccount( accountId );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
QPixmap
|
|
||||||
SpotifyAccountFactory::icon() const
|
|
||||||
{
|
|
||||||
if ( !s_icon )
|
|
||||||
s_icon = new QPixmap( RESPATH "images/spotify-logo.png" );
|
|
||||||
|
|
||||||
return *s_icon;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SpotifyAccount* SpotifyAccount::s_instance = 0;
|
SpotifyAccount* SpotifyAccount::s_instance = 0;
|
||||||
|
|
||||||
SpotifyAccount*
|
SpotifyAccount*
|
||||||
|
@@ -61,24 +61,6 @@ struct SpotifyPlaylistInfo {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class DLLEXPORT SpotifyAccountFactory : public AccountFactory
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
SpotifyAccountFactory() {}
|
|
||||||
|
|
||||||
virtual Account* createAccount( const QString& accountId = QString() );
|
|
||||||
virtual QString description() const { return tr( "Play music from and sync your playlists with Spotify Premium" ); }
|
|
||||||
virtual QString factoryId() const { return "spotifyaccount"; }
|
|
||||||
virtual QString prettyName() const { return "Spotify"; }
|
|
||||||
|
|
||||||
virtual AccountTypes types() const { return AccountTypes( ResolverType ); }
|
|
||||||
virtual bool allowUserCreation() const { return false; }
|
|
||||||
virtual QPixmap icon() const;
|
|
||||||
virtual bool isUnique() const { return true; }
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
class DLLEXPORT SpotifyAccount : public CustomAtticaAccount
|
class DLLEXPORT SpotifyAccount : public CustomAtticaAccount
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@@ -50,8 +50,6 @@
|
|||||||
#include "utils/NetworkAccessManager.h"
|
#include "utils/NetworkAccessManager.h"
|
||||||
|
|
||||||
#include "accounts/lastfm/LastFmAccount.h"
|
#include "accounts/lastfm/LastFmAccount.h"
|
||||||
#include "accounts/spotify/SpotifyAccount.h"
|
|
||||||
//#include "accounts/spotify/SpotifyPlaylistUpdater.h"
|
|
||||||
#include "accounts/AccountManager.h"
|
#include "accounts/AccountManager.h"
|
||||||
#include "audio/AudioEngine.h"
|
#include "audio/AudioEngine.h"
|
||||||
#include "database/Database.h"
|
#include "database/Database.h"
|
||||||
@@ -563,10 +561,6 @@ TomahawkApp::initFactoriesForAccountManager()
|
|||||||
m_accountManager.data()->addAccountFactory( lastfmFactory );
|
m_accountManager.data()->addAccountFactory( lastfmFactory );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Tomahawk::Accounts::SpotifyAccountFactory* spotifyFactory = new Tomahawk::Accounts::SpotifyAccountFactory;
|
|
||||||
m_accountManager.data()->addAccountFactory( spotifyFactory );
|
|
||||||
m_accountManager.data()->registerAccountFactoryForFilesystem( spotifyFactory );
|
|
||||||
|
|
||||||
Tomahawk::Accounts::AccountManager::instance()->loadFromConfig();
|
Tomahawk::Accounts::AccountManager::instance()->loadFromConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -678,7 +672,6 @@ TomahawkApp::onInfoSystemReady()
|
|||||||
Tomahawk::EchonestCatalogSynchronizer::instance();
|
Tomahawk::EchonestCatalogSynchronizer::instance();
|
||||||
|
|
||||||
PlaylistUpdaterInterface::registerUpdaterFactory( new XspfUpdaterFactory );
|
PlaylistUpdaterInterface::registerUpdaterFactory( new XspfUpdaterFactory );
|
||||||
// PlaylistUpdaterInterface::registerUpdaterFactory( new SpotifyUpdaterFactory );
|
|
||||||
|
|
||||||
// Following work-around/fix taken from Clementine rev. 13e13ccd9a95 and courtesy of David Sansome
|
// Following work-around/fix taken from Clementine rev. 13e13ccd9a95 and courtesy of David Sansome
|
||||||
// A bug in Qt means the wheel_scroll_lines setting gets ignored and replaced
|
// A bug in Qt means the wheel_scroll_lines setting gets ignored and replaced
|
||||||
|
Reference in New Issue
Block a user