working on cover art

This commit is contained in:
0x01FE committed 2025-01-24 14:48:57 -06:00
1 parent ee479940b6
commit 2d97c921af
4 files changed
+26 -2

No files matched your search

+12
View File
@@ -374,6 +374,18 @@ class SubpyConn:
return requests.get(url + self._encodePayload(payload), stream=True)
# Saves cover art id
def getCoverArt(self, cover_art_id: str, path: str | None = None) -> None:
url = self.base_url + '/rest/getCoverArt?'
payload = self._getBasePayload()
payload['id'] = cover_art_id
r = requests.get(url + self._encodePayload(payload))
with open(path if path else 'cover.png', 'wb') as file:
file.write(r.content)
def getSong(self, song_id: str) -> Song:
url = self.base_url + '/rest/getSong?'