Skip to content

Commit

Permalink
Account for playlists with no icon
Browse files Browse the repository at this point in the history
  • Loading branch information
oblivioncth committed Oct 16, 2023
1 parent d0da1c1 commit b8f75c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/src/fp-playlistmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ QX_JSON_MEMBER_OVERRIDE(Json::Playlist, icon,
if(!jv.isString())
return Qx::JsonError(Json::Playlist::ERR_ICON_PARSE, Qx::JsonError::TypeMismatch);

QString inlineImageUri = jv.toString();
QString inlineImageUri = jv.toString().trimmed();

if(inlineImageUri.isEmpty()) // No icon
{
member = QImage();
return Qx::JsonError();
}

// Get Base64 data
static Qx::JsonError convErr(Json::Playlist::ERR_ICON_PARSE, Qx::JsonError::InvalidValue);
Expand Down

0 comments on commit b8f75c3

Please sign in to comment.