added ff/rewind & make album art load just bytes instead of writing to a file

This commit is contained in:
0x01fe committed 2025-01-24 21:37:50 -06:00
1 parent c1c640f837
commit 7ad56fa4be
3 files changed
+56 -18

No files matched your search

+10
View File
@@ -386,6 +386,16 @@ class SubpyConn:
with open(path if path else 'cover.png', 'wb') as file:
file.write(r.content)
def getCoverArtRaw(self, cover_art_id: str) -> bytes:
url = self.base_url + '/rest/getCoverArt?'
payload = self._getBasePayload()
payload['id'] = cover_art_id
r = requests.get(url + self._encodePayload(payload))
return r.content
def getSong(self, song_id: str) -> Song:
url = self.base_url + '/rest/getSong?'