diff options
author | jcass <john.cass77@gmail.com> | 2015-11-29 22:12:14 +0200 |
---|---|---|
committer | jcass <john.cass77@gmail.com> | 2015-11-29 22:12:14 +0200 |
commit | 1788b4316a29c6eb210d063bdab4a9c7a6ed31d2 (patch) | |
tree | f0c762810b8132b703ed31b9f92c58a26c5c489f | |
parent | 6f4f611199a351ed0cbdcb3de827cb931244014c (diff) | |
parent | eacd8d3887bc7095c0ced6aa1f05be62fbd1f277 (diff) | |
download | pydora-1788b4316a29c6eb210d063bdab4a9c7a6ed31d2.tar.bz2 pydora-1788b4316a29c6eb210d063bdab4a9c7a6ed31d2.tar.xz pydora-1788b4316a29c6eb210d063bdab4a9c7a6ed31d2.zip |
Merge branch 'enhance/genre_support' into develop
-rw-r--r-- | pandora/client.py | 3 | ||||
-rw-r--r-- | pandora/models/pandora.py | 6 | ||||
-rw-r--r-- | setup.py | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/pandora/client.py b/pandora/client.py index 15720b6..c88003f 100644 --- a/pandora/client.py +++ b/pandora/client.py | |||
@@ -196,6 +196,9 @@ class APIClient(BaseAPIClient): | |||
196 | categories = self("station.getGenreStations")["categories"] | 196 | categories = self("station.getGenreStations")["categories"] |
197 | return GenreStations.from_json(self, categories) | 197 | return GenreStations.from_json(self, categories) |
198 | 198 | ||
199 | def get_genre_stations_checksum(self): | ||
200 | return self("station.getGenreStationsChecksum")["checksum"] | ||
201 | |||
199 | def rename_station(self, station_token, name): | 202 | def rename_station(self, station_token, name): |
200 | return self("station.renameStation", | 203 | return self("station.renameStation", |
201 | stationToken=station_token, | 204 | stationToken=station_token, |
diff --git a/pandora/models/pandora.py b/pandora/models/pandora.py index 60ef107..8507c1b 100644 --- a/pandora/models/pandora.py +++ b/pandora/models/pandora.py | |||
@@ -205,6 +205,12 @@ class SearchResult(PandoraModel): | |||
205 | 205 | ||
206 | class GenreStations(PandoraDictListModel): | 206 | class GenreStations(PandoraDictListModel): |
207 | 207 | ||
208 | checksum = None | ||
209 | |||
208 | __dict_key__ = "categoryName" | 210 | __dict_key__ = "categoryName" |
209 | __list_key__ = "stations" | 211 | __list_key__ = "stations" |
210 | __list_model__ = Station | 212 | __list_model__ = Station |
213 | |||
214 | def has_changed(self): | ||
215 | checksum = self._api_client.get_genre_stations_checksum() | ||
216 | return checksum != self.checksum | ||
@@ -68,7 +68,7 @@ class check_style(SimpleCommand): | |||
68 | 68 | ||
69 | setup( | 69 | setup( |
70 | name="pydora", | 70 | name="pydora", |
71 | version="1.5.1", | 71 | version="1.5.2", |
72 | description="Python wrapper for Pandora API", | 72 | description="Python wrapper for Pandora API", |
73 | long_description=open("README.rst", "r").read(), | 73 | long_description=open("README.rst", "r").read(), |
74 | author="Mike Crute", | 74 | author="Mike Crute", |