diff options
Diffstat (limited to 'pandora/models/pandora.py')
-rw-r--r-- | pandora/models/pandora.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pandora/models/pandora.py b/pandora/models/pandora.py index 71a1d51..cd1e588 100644 --- a/pandora/models/pandora.py +++ b/pandora/models/pandora.py | |||
@@ -54,8 +54,7 @@ class StationList(PandoraListModel): | |||
54 | 54 | ||
55 | class AudioField(SyntheticField): | 55 | class AudioField(SyntheticField): |
56 | 56 | ||
57 | @staticmethod | 57 | def formatter(self, api_client, data, value): |
58 | def formatter(api_client, field, data, value): | ||
59 | """Get audio-related fields | 58 | """Get audio-related fields |
60 | 59 | ||
61 | Try to find fields for the audio url for specified preferred quality | 60 | Try to find fields for the audio url for specified preferred quality |
@@ -97,9 +96,9 @@ class AudioField(SyntheticField): | |||
97 | audio_url = url_map.get(quality) | 96 | audio_url = url_map.get(quality) |
98 | 97 | ||
99 | if audio_url: | 98 | if audio_url: |
100 | return audio_url[field] | 99 | return audio_url[self.field] |
101 | 100 | ||
102 | return audio_url[field] if audio_url else None | 101 | return audio_url[self.field] if audio_url else None |
103 | 102 | ||
104 | 103 | ||
105 | class PlaylistModel(PandoraModel): | 104 | class PlaylistModel(PandoraModel): |