Playlist: Invalidate deleted songs in main thread

Fixes #1625
This commit is contained in:
Jonas Kvinge
2025-01-04 00:16:36 +01:00
parent a13fc31f83
commit a96627c5a9
2 changed files with 8 additions and 24 deletions

View File

@@ -239,14 +239,12 @@ class Playlist : public QAbstractListModel {
// song will be reloaded to even out the situation because obviously something has changed.
// This returns true if this playlist had current item when the method was invoked.
bool ApplyValidityOnCurrentSong(const QUrl &url, bool valid);
// Grays out and reloads all deleted songs in all playlists. Also, "ungreys" those songs which were once deleted but now got restored somehow.
void InvalidateDeletedSongs();
// Removes from the playlist all local files that don't exist anymore.
void RemoveDeletedSongs();
void StopAfter(const int row);
void ReloadItems(const QList<int> &rows);
void ReloadItemsBlocking(const QList<int> &rows);
void InformOfCurrentSongChange(const bool minor);
// Just emits the dataChanged() signal so the mood column is repainted.
@@ -354,6 +352,9 @@ class Playlist : public QAbstractListModel {
void TurnOnDynamicPlaylist(PlaylistGeneratorPtr gen);
void InsertDynamicItems(const int count);
// Grays out and reloads all deleted songs in all playlists. Also, "ungreys" those songs which were once deleted but now got restored somehow.
void InvalidateDeletedSongs();
private Q_SLOTS:
void TracksAboutToBeDequeued(const QModelIndex&, const int begin, const int end);
void TracksDequeued();