From bdde9c5e6cf9051dab1021aaf71b10a98c43ab66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=88=9A=28noham=29=C2=B2?= Date: Tue, 26 Mar 2024 18:33:48 +0100 Subject: [PATCH] change css + bug fix --- .gitignore | 3 ++- front-example/html.html | 2 +- front-example/{style.css => player.css} | 1 + user/export.py | 5 ++++- 4 files changed, 8 insertions(+), 3 deletions(-) rename front-example/{style.css => player.css} (98%) diff --git a/.gitignore b/.gitignore index 111870f..153c112 100644 --- a/.gitignore +++ b/.gitignore @@ -135,4 +135,5 @@ user/exemple.plist user/test2.applescript user/test.applescript user/test.py -front-noh.am/ \ No newline at end of file +front-noh.am/ +player-for-noh.am.css \ No newline at end of file diff --git a/front-example/html.html b/front-example/html.html index 129ae4a..a3bc7de 100644 --- a/front-example/html.html +++ b/front-example/html.html @@ -6,7 +6,7 @@ - + Music Player diff --git a/front-example/style.css b/front-example/player.css similarity index 98% rename from front-example/style.css rename to front-example/player.css index c967714..9120e73 100644 --- a/front-example/style.css +++ b/front-example/player.css @@ -4,6 +4,7 @@ box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + text-align:left; } body { diff --git a/user/export.py b/user/export.py index 7c854b9..38972af 100644 --- a/user/export.py +++ b/user/export.py @@ -90,7 +90,10 @@ def main(): persistendId = currentsong['persistent ID'] currentsong['timestamp'] = time.time() (currentsong['artwork_url'], currentsong['itunes_url'], currentsong['artist_url']) = get_track_extras(currentsong['name'], currentsong['artist'], currentsong['album']) - currentsong['dominantcolor'] = get_dominant_color_from_url(currentsong['artwork_url']) + try: + currentsong['dominantcolor'] = get_dominant_color_from_url(currentsong['artwork_url']) + except: + currentsong['dominantcolor'] = [0,0,0] printout(f"{post(currentsong)}") timets = float(currentsong['duration'].replace(",", "."))-float(currentsong['pPosition'].replace(",", ".")) + 3 prevstatus = 'playing'