mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 03:45:56 +01:00
Fix a crash when loading an old playlist containing Radio items after an upgrade to a version where they're Internet items
This commit is contained in:
parent
05ac1e1afc
commit
69bd5555e7
@ -33,7 +33,6 @@ class InternetPlaylistItem : public PlaylistItem {
|
|||||||
Options options() const;
|
Options options() const;
|
||||||
|
|
||||||
bool InitFromQuery(const SqlRow& query);
|
bool InitFromQuery(const SqlRow& query);
|
||||||
void BindToQuery(QSqlQuery *query) const;
|
|
||||||
|
|
||||||
Song Metadata() const;
|
Song Metadata() const;
|
||||||
QUrl Url() const;
|
QUrl Url() const;
|
||||||
|
@ -41,8 +41,8 @@ PlaylistItem* PlaylistItem::NewFromType(const QString& type) {
|
|||||||
return new JamendoPlaylistItem(type);
|
return new JamendoPlaylistItem(type);
|
||||||
if (type == "Stream" || type == "File")
|
if (type == "Stream" || type == "File")
|
||||||
return new SongPlaylistItem(type);
|
return new SongPlaylistItem(type);
|
||||||
if (type == "Internet")
|
if (type == "Internet" || type == "Radio")
|
||||||
return new InternetPlaylistItem(type);
|
return new InternetPlaylistItem("Internet");
|
||||||
|
|
||||||
qLog(Warning) << "Invalid PlaylistItem type:" << type;
|
qLog(Warning) << "Invalid PlaylistItem type:" << type;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user