mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 13:21:52 +02:00
TWK-854: Handle deletion of synced playlist
This commit is contained in:
@@ -382,6 +382,17 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
|
|||||||
m_configWidget.data()->loginResponse( success, message );
|
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
|
void
|
||||||
SpotifyPlaylistUpdater::removeFromSettings( const QString& group ) const
|
SpotifyPlaylistUpdater::removeFromSettings( const QString& group ) const
|
||||||
{
|
{
|
||||||
|
@@ -55,6 +55,7 @@ public:
|
|||||||
|
|
||||||
QString spotifyId() const { return m_spotifyId; }
|
QString spotifyId() const { return m_spotifyId; }
|
||||||
|
|
||||||
|
void remove( bool askToDeletePlaylist = true );
|
||||||
public slots:
|
public slots:
|
||||||
/// Spotify callbacks when we are directly instructed from the resolver
|
/// Spotify callbacks when we are directly instructed from the resolver
|
||||||
void spotifyTracksAdded( const QVariantList& tracks, const QString& startPosId, const QString& newRev, const QString& oldRev );
|
void spotifyTracksAdded( const QVariantList& tracks, const QString& startPosId, const QString& newRev, const QString& oldRev );
|
||||||
|
Reference in New Issue
Block a user