From c96bcd5337113559d55f0195e8c9b22827134955 Mon Sep 17 00:00:00 2001 From: MinaciousGrace Date: Thu, 8 Jun 2017 05:01:44 -0400 Subject: [PATCH] trim out unloaded charts from the favorites playlist --- src/SongManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SongManager.cpp b/src/SongManager.cpp index 174e89d71a..7e0ea8defb 100644 --- a/src/SongManager.cpp +++ b/src/SongManager.cpp @@ -388,8 +388,12 @@ void SongManager::MakePlaylistFromFavorites(set& favs) { for (auto& n : favs) pl.AddChart(n); - allplaylists.emplace("Favorites", pl); + // kinda messy but, trim unloaded charts from the favorites playlist -mina + for (size_t i = 0; i < pl.chartlist.size(); ++i) + if (!pl.chartlist[i].loaded) + pl.DeleteChart(i); + allplaylists.emplace("Favorites", pl); vector playlistgroup; for (auto& n : pl.chartlist) if(n.loaded)