Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion librespot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class Version:
version_name = "0.0.10"
version_name = "0.0.11"

@staticmethod
def platform() -> Platform:
Expand Down
18 changes: 9 additions & 9 deletions librespot/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ def get_ext_metadata(self, extension_kind: ExtensionKind, uri: str):

body = response.content
if body is None:
raise ConnectionError("Extended Metadata request failed: No response body")
raise ConnectionError("Extended Metadata request for {} failed: No response body".format(uri))

proto = BatchedExtensionResponse()
proto.ParseFromString(body)
entityextd = proto.extended_metadata.pop().extension_data.pop()
if entityextd.header.status_code != 200:
raise ConnectionError("Extended Metadata request failed: Status code {}".format(entityextd.header.status_code))
raise ConnectionError("Extended Metadata request for {} failed: Status code {}".format(uri, entityextd.header.status_code))
mdb: bytes = entityextd.extension_data.value
return mdb

Expand Down Expand Up @@ -267,20 +267,20 @@ def get_metadata_4_show(self, show: ShowId) -> Metadata.Show:
md.ParseFromString(mdb)
return md

def get_playlist(self,
_id: PlaylistId) -> Playlist4External.SelectedListContent:
def get_playlist(self, playlist: PlaylistId) -> Playlist4External.SelectedListContent:
"""

:param _id: PlaylistId:
:param playlist: PlaylistId:

"""
response = self.send("GET",
"/playlist/v2/playlist/{}".format(_id.id()), None,
None)
response = self.send("GET", "/playlist/v2/playlist/{}".format(playlist.id()),
None, None)
ApiClient.StatusCodeException.check_status(response)

body = response.content
if body is None:
raise IOError()
raise ConnectionError("Playlist Metadata request for {} failed: No response body".format(playlist.to_spotify_uri()))

proto = Playlist4External.SelectedListContent()
proto.ParseFromString(body)
return proto
Expand Down
Loading
Loading