diff --git a/.gitignore b/.gitignore index 3caa297..7abc2af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ album_art.gif album_art.jpg + diff --git a/get_oorp.py b/get_oorp.py new file mode 100644 index 0000000..eba72ba --- /dev/null +++ b/get_oorp.py @@ -0,0 +1,43 @@ +#!/bin/python3 + +from tkinter import * +from tkinter.font import Font +from PIL import Image +import requests +import urllib + + +class RP: + def __init__(self): + self.title + self.artist + self.album + self.year + self.time + self.jpg_path + + def rp_refresh_API(): + respons=requests.get("https://api.radioparadise.com/api/now_playing") + rp_dict=respons.json() + title=rp_dict["title"] + artist=rp_dict["artist"] + albun=rp_dict["album"] + year=rp_dict["year"] + time=rp_dict["time"] + jpg_path=rp_dict["cover"] + + def store_albumcover(): + rp_raw_image=requests.get(jpg_path).content + rp_file.open("album_art.jpg", "wb") + rp_file.close() + rp_convert_img=Image.open("album_art.jpg") + rp_convert_img.save("album_art.gif") + rp_convert_img.close() + + +def main(): + pass + +if __name__=="__main__": + main() + \ No newline at end of file