diff options
author | jcass <john.cass77@gmail.com> | 2016-05-29 13:42:07 +0200 |
---|---|---|
committer | jcass <john.cass77@gmail.com> | 2016-05-29 13:42:07 +0200 |
commit | aabde7966a7ffef083f73368ca6f2904a778a78f (patch) | |
tree | 317339243d7d14653e49904a6d05db0a709f2401 /pandora | |
parent | 526b28e6f546dabb945500ed2dcb82d7988416df (diff) | |
download | pydora-aabde7966a7ffef083f73368ca6f2904a778a78f.tar.bz2 pydora-aabde7966a7ffef083f73368ca6f2904a778a78f.tar.xz pydora-aabde7966a7ffef083f73368ca6f2904a778a78f.zip |
Fix SearchResult model.
Diffstat (limited to 'pandora')
-rw-r--r-- | pandora/models/pandora.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pandora/models/pandora.py b/pandora/models/pandora.py index d0c6aab..a3a83b7 100644 --- a/pandora/models/pandora.py +++ b/pandora/models/pandora.py | |||
@@ -278,8 +278,8 @@ class Bookmark(PandoraModel): | |||
278 | 278 | ||
279 | class BookmarkList(PandoraModel): | 279 | class BookmarkList(PandoraModel): |
280 | 280 | ||
281 | songs = Field("songs", formatter=PandoraModel.from_json_list) | 281 | songs = Field("songs", formatter=Bookmark.from_json_list) |
282 | artists = Field("artists", formatter=PandoraModel.from_json_list) | 282 | artists = Field("artists", formatter=Bookmark.from_json_list) |
283 | 283 | ||
284 | 284 | ||
285 | class SearchResultItem(PandoraModel): | 285 | class SearchResultItem(PandoraModel): |
@@ -287,7 +287,7 @@ class SearchResultItem(PandoraModel): | |||
287 | artist = Field("artistName") | 287 | artist = Field("artistName") |
288 | song_name = Field("songName") | 288 | song_name = Field("songName") |
289 | score = Field("score") | 289 | score = Field("score") |
290 | likely_match = Field("likelyMatch") | 290 | likely_match = Field("likelyMatch", default=False) |
291 | token = Field("musicToken") | 291 | token = Field("musicToken") |
292 | 292 | ||
293 | @property | 293 | @property |
@@ -305,8 +305,8 @@ class SearchResult(PandoraModel): | |||
305 | 305 | ||
306 | nearest_matches_available = Field("nearMatchesAvailable") | 306 | nearest_matches_available = Field("nearMatchesAvailable") |
307 | explanation = Field("explanation") | 307 | explanation = Field("explanation") |
308 | songs = Field("songs", formatter=PandoraModel.from_json_list) | 308 | songs = Field("songs", formatter=SearchResultItem.from_json_list) |
309 | artists = Field("artists", formatter=PandoraModel.from_json_list) | 309 | artists = Field("artists", formatter=SearchResultItem.from_json_list) |
310 | 310 | ||
311 | 311 | ||
312 | class GenreStationList(PandoraDictListModel): | 312 | class GenreStationList(PandoraDictListModel): |