mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
TWK-854: Handle deletion of synced playlist
This commit is contained in:
parent
3b4c3cd36c
commit
e1c7c9df05
@ -382,6 +382,17 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
|
||||
m_configWidget.data()->loginResponse( success, message );
|
||||
}
|
||||
}
|
||||
else if ( msgType == "playlistDeleted" )
|
||||
{
|
||||
const QString plid = msg.value( "playlistid" ).toString();
|
||||
|
||||
Q_ASSERT( m_updaters.contains( plid ) );
|
||||
if ( !m_updaters.contains( plid ) )
|
||||
return;
|
||||
|
||||
SpotifyPlaylistUpdater* updater = m_updaters.take( plid );
|
||||
updater->remove( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -112,6 +112,15 @@ SpotifyPlaylistUpdater::~SpotifyPlaylistUpdater()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SpotifyPlaylistUpdater::remove( bool askToDeletePlaylist )
|
||||
{
|
||||
if ( !askToDeletePlaylist )
|
||||
m_sync = false;
|
||||
PlaylistUpdaterInterface::remove();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SpotifyPlaylistUpdater::removeFromSettings( const QString& group ) const
|
||||
{
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
|
||||
QString spotifyId() const { return m_spotifyId; }
|
||||
|
||||
void remove( bool askToDeletePlaylist = true );
|
||||
public slots:
|
||||
/// Spotify callbacks when we are directly instructed from the resolver
|
||||
void spotifyTracksAdded( const QVariantList& tracks, const QString& startPosId, const QString& newRev, const QString& oldRev );
|
||||
|
Loading…
x
Reference in New Issue
Block a user