mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
Differentiate between setting subscribed and changing status
This commit is contained in:
@@ -679,7 +679,7 @@ SpotifyAccount::setSubscribedForPlaylist( const playlist_ptr& playlist, bool sub
|
||||
sendMessage( msg, this );
|
||||
|
||||
updater->setSync( subscribed );
|
||||
updater->setSubscribed( subscribed );
|
||||
updater->setSubscribedStatus( subscribed );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -65,7 +65,7 @@ SpotifyUpdaterFactory::create( const Tomahawk::playlist_ptr& pl, const QVariantH
|
||||
SpotifyPlaylistUpdater* updater = new SpotifyPlaylistUpdater( m_account.data(), latestRev, spotifyId, pl );
|
||||
updater->setSync( sync );
|
||||
updater->setCanSubscribe( canSubscribe );
|
||||
updater->setSubscribed( isSubscribed );
|
||||
updater->setSubscribedStatus( isSubscribed );
|
||||
m_account.data()->registerUpdaterForPlaylist( spotifyId, updater );
|
||||
|
||||
return updater;
|
||||
@@ -242,8 +242,9 @@ SpotifyPlaylistUpdater::sync() const
|
||||
return m_sync;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SpotifyPlaylistUpdater::setSubscribed( bool subscribed )
|
||||
SpotifyPlaylistUpdater::setSubscribedStatus( bool subscribed )
|
||||
{
|
||||
if ( m_subscribed == subscribed )
|
||||
return;
|
||||
@@ -255,6 +256,16 @@ SpotifyPlaylistUpdater::setSubscribed( bool subscribed )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SpotifyPlaylistUpdater::setSubscribed( bool subscribed )
|
||||
{
|
||||
if ( !m_spotify.isNull() )
|
||||
m_spotify.data()->setSubscribedForPlaylist( playlist(), subscribed );
|
||||
|
||||
// Spotify account will in turn call setSUbscribedStatus
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SpotifyPlaylistUpdater::subscribed() const
|
||||
{
|
||||
|
@@ -55,7 +55,10 @@ public:
|
||||
bool sync() const;
|
||||
void setSync( bool sync );
|
||||
bool subscribed() const;
|
||||
// actually change the subscribed value in spotify
|
||||
void setSubscribed( bool subscribed );
|
||||
// Just set the subscribed flag
|
||||
void setSubscribedStatus( bool subscribed );
|
||||
bool canSubscribe() const;
|
||||
void setCanSubscribe( bool canSub );
|
||||
QString spotifyId() const { return m_spotifyId; }
|
||||
|
Reference in New Issue
Block a user