Skip to content

Commit

Permalink
Fix not loading owner id properly
Browse files Browse the repository at this point in the history
  • Loading branch information
kraxarn committed Jun 27, 2020
1 parent 4f8adbc commit 7983f9d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/spotify/playlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ Playlist::Playlist(const QJsonObject &json)
snapshot = Utils::getProperty(json, {
"snapshot", "snapshot_id"
}).toString();
ownerId = Utils::getProperty(json, {
"owner_id", "ownerId", "owner"
}).toString();
ownerId = json.contains("owner_id")
? json["owner_id"].toString()
: json.contains("ownerId")
? json["owner_id"].toString()
: json["owner"].toObject()["id"].toString();
ownerName = json.contains("owner_name")
? json["owner_name"].toString()
: json.contains("ownerName")
Expand Down

0 comments on commit 7983f9d

Please sign in to comment.