you can now play and pause songs
This commit is contained in:
1 parent
f8815964b5
commit
2fe525d0d6
5 files changed
+1817
-311
No files matched your search
+17
@@ -305,6 +305,23 @@ class SubpyConn:
|
||||
|
||||
return playlists
|
||||
|
||||
def getPlaylist(self, playlist_id: str) -> list[Song]:
|
||||
url = self.base_url + "/rest/getPlaylist?"
|
||||
|
||||
payload = self._getBasePayload()
|
||||
payload['f'] = 'json'
|
||||
payload['id'] = playlist_id
|
||||
|
||||
r = requests.get(url + self._encodePayload(payload))
|
||||
|
||||
json_r = r.json()
|
||||
|
||||
songs: list[Song] = []
|
||||
for song in json_r['subsonic-response']['playlist']['entry']:
|
||||
songs.append(Song(song))
|
||||
|
||||
return songs
|
||||
|
||||
def getStarred(self) -> list[Album | Song | Artist]:
|
||||
url = self.base_url + "/rest/getStarred?"
|
||||
|
||||
|
||||
Reference in new issue
Block a user