rewrite getting artist images using classes

- remove left padding on #acontent
This commit is contained in:
geoffrey45
2022-05-31 00:05:37 +03:00
parent 94504a1575
commit 9879f131e8
6 changed files with 107 additions and 51 deletions
+11 -4
View File
@@ -46,7 +46,12 @@ class Track:
self.length = tags["length"]
self.genre = tags["genre"]
self.bitrate = tags["bitrate"]
self.image = tags["image"]
try:
self.image = tags["image"]
except KeyError:
print(tags)
self.tracknumber = tags["tracknumber"]
self.discnumber = tags["discnumber"]
self.albumhash = tags["albumhash"]
@@ -97,9 +102,11 @@ class Album:
def get_p_track(ptrack):
for track in api.TRACKS:
if (track.title == ptrack["title"]
and track.artists == ptrack["artists"]
and ptrack["album"] == track.album):
if (
track.title == ptrack["title"]
and track.artists == ptrack["artists"]
and ptrack["album"] == track.album
):
return track