mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 23:26:40 +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 );
|
sendMessage( msg, this );
|
||||||
|
|
||||||
updater->setSync( subscribed );
|
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 );
|
SpotifyPlaylistUpdater* updater = new SpotifyPlaylistUpdater( m_account.data(), latestRev, spotifyId, pl );
|
||||||
updater->setSync( sync );
|
updater->setSync( sync );
|
||||||
updater->setCanSubscribe( canSubscribe );
|
updater->setCanSubscribe( canSubscribe );
|
||||||
updater->setSubscribed( isSubscribed );
|
updater->setSubscribedStatus( isSubscribed );
|
||||||
m_account.data()->registerUpdaterForPlaylist( spotifyId, updater );
|
m_account.data()->registerUpdaterForPlaylist( spotifyId, updater );
|
||||||
|
|
||||||
return updater;
|
return updater;
|
||||||
@@ -242,8 +242,9 @@ SpotifyPlaylistUpdater::sync() const
|
|||||||
return m_sync;
|
return m_sync;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyPlaylistUpdater::setSubscribed( bool subscribed )
|
SpotifyPlaylistUpdater::setSubscribedStatus( bool subscribed )
|
||||||
{
|
{
|
||||||
if ( m_subscribed == subscribed )
|
if ( m_subscribed == subscribed )
|
||||||
return;
|
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
|
bool
|
||||||
SpotifyPlaylistUpdater::subscribed() const
|
SpotifyPlaylistUpdater::subscribed() const
|
||||||
{
|
{
|
||||||
|
@@ -55,7 +55,10 @@ public:
|
|||||||
bool sync() const;
|
bool sync() const;
|
||||||
void setSync( bool sync );
|
void setSync( bool sync );
|
||||||
bool subscribed() const;
|
bool subscribed() const;
|
||||||
|
// actually change the subscribed value in spotify
|
||||||
void setSubscribed( bool subscribed );
|
void setSubscribed( bool subscribed );
|
||||||
|
// Just set the subscribed flag
|
||||||
|
void setSubscribedStatus( bool subscribed );
|
||||||
bool canSubscribe() const;
|
bool canSubscribe() const;
|
||||||
void setCanSubscribe( bool canSub );
|
void setCanSubscribe( bool canSub );
|
||||||
QString spotifyId() const { return m_spotifyId; }
|
QString spotifyId() const { return m_spotifyId; }
|
||||||
|
Reference in New Issue
Block a user