diff --git a/album_art.gif b/album_art.gif index 1589ae9..e7d0f11 100644 Binary files a/album_art.gif and b/album_art.gif differ diff --git a/album_art.jpg b/album_art.jpg index ec040ed..aadbf65 100644 Binary files a/album_art.jpg and b/album_art.jpg differ diff --git a/get_oorp.py b/get_oorp.py index 60c3f46..c51a215 100755 --- a/get_oorp.py +++ b/get_oorp.py @@ -26,15 +26,10 @@ class RadioParadise(object): result=(f'Titel: {self.title}\nArtiest: {self.artist}\nAlbum: {self.album}\nJaar: {self.year}\nTijd: {self.time}') return result -class AlbumCover(RadioParadise): - def __init__(self, path, *args, **kwargs): - super().__init__(*args, **kwargs) - self.jpg_path=path - def store_albumcover(self): rp_raw_image=requests.get(self.jpg_path).content rp_file=open("album_art.jpg", "wb") - rp_file.write("rp_raw_image") + rp_file.write(rp_raw_image) rp_file.close() rp_convert_img=Image.open("album_art.jpg") rp_convert_img.save("album_art.gif") @@ -59,6 +54,10 @@ class RPViewer(Tk): self.textbox.insert("1.0", self.rp.get_fmt_list()) self.textbox.config(state=DISABLED) self.textbox.pack() + self.rp.store_albumcover() + self.img = PhotoImage(file="album_art.gif", format='gif') + self.image_lbl = Label(self, image=self.img) + self.image_lbl.pack() def quit(self): exit()