Fixed issue with getting metadata and changing position in queue via DBus

This commit is contained in:
Sumner Evans
2019-12-10 20:37:51 -07:00
parent 1c4479890f
commit 178e60048a
4 changed files with 31 additions and 33 deletions

View File

@@ -143,7 +143,11 @@ class Server:
def do_download(self, url, **params) -> bytes:
print('download', url)
return self._get(url, **params).content
download = self._get(url, **params)
if 'json' in download.get('Content-Type'):
# TODO make better
raise Exception("Didn't expect JSON.")
return download.content
def ping(self) -> Response:
"""