From cd10fda8b75377c89feb34387f207ed76ceb15ba Mon Sep 17 00:00:00 2001 From: John Maguire Date: Thu, 25 Feb 2010 01:20:59 +0000 Subject: [PATCH] Clear playlist on Tune() Updates issue 17 --- src/lastfmservice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lastfmservice.cpp b/src/lastfmservice.cpp index f7c52f831..26f6427e2 100644 --- a/src/lastfmservice.cpp +++ b/src/lastfmservice.cpp @@ -610,6 +610,10 @@ void LastFMService::FetchMoreTracksFinished() { } void LastFMService::Tune(const lastfm::RadioStation& station) { + foreach (QueuedTrack* t, playlist_) { + delete t; + } + playlist_.clear(); QMap params; params["method"] = "radio.tune"; params["station"] = station.url();