Skip to content

Commit

Permalink
trim out unloaded charts from the favorites playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 8, 2017
1 parent f3b34ec commit c96bcd5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/SongManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,12 @@ void SongManager::MakePlaylistFromFavorites(set<string>& 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<Song*> playlistgroup;
for (auto& n : pl.chartlist)
if(n.loaded)
Expand Down

0 comments on commit c96bcd5

Please sign in to comment.