From 69bd5555e766226e23311f5cbd51c99d94ce9679 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Mon, 18 Jul 2011 22:20:22 +0000 Subject: [PATCH] Fix a crash when loading an old playlist containing Radio items after an upgrade to a version where they're Internet items --- src/internet/internetplaylistitem.h | 1 - src/playlist/playlistitem.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/internet/internetplaylistitem.h b/src/internet/internetplaylistitem.h index d0eaa975c..9d995fdd0 100644 --- a/src/internet/internetplaylistitem.h +++ b/src/internet/internetplaylistitem.h @@ -33,7 +33,6 @@ class InternetPlaylistItem : public PlaylistItem { Options options() const; bool InitFromQuery(const SqlRow& query); - void BindToQuery(QSqlQuery *query) const; Song Metadata() const; QUrl Url() const; diff --git a/src/playlist/playlistitem.cpp b/src/playlist/playlistitem.cpp index 6493f9b18..51d8adb1c 100644 --- a/src/playlist/playlistitem.cpp +++ b/src/playlist/playlistitem.cpp @@ -41,8 +41,8 @@ PlaylistItem* PlaylistItem::NewFromType(const QString& type) { return new JamendoPlaylistItem(type); if (type == "Stream" || type == "File") return new SongPlaylistItem(type); - if (type == "Internet") - return new InternetPlaylistItem(type); + if (type == "Internet" || type == "Radio") + return new InternetPlaylistItem("Internet"); qLog(Warning) << "Invalid PlaylistItem type:" << type; return NULL;