From 3a285dae1733176890cfe176c2252e5f37b43612 Mon Sep 17 00:00:00 2001 From: Cheap Nightbot <151442433+CheapNightbot@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:04:00 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=BC=20Add=20`genre`=20&=20`tempo`=20in?= =?UTF-8?q?=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api.py | 2 ++ templates/index.html | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/api.py b/api.py index 8aa06e8..859050f 100644 --- a/api.py +++ b/api.py @@ -78,10 +78,12 @@ def build_response_template(response, artist, song): artist=artist, artists=yutify_data.get("artists"), deezer=yutify_data.get("deezer"), + genre=yutify_data.get("genre"), itunes=yutify_data.get("itunes"), song=song, spotify=yutify_data.get("spotify"), title=yutify_data.get("title"), + tempo=yutify_data.get("tempo"), yt_music=yutify_data["ytmusic"].get("url") if yutify_data["ytmusic"] else None, ) diff --git a/templates/index.html b/templates/index.html index 79e4798..55923b7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -44,7 +44,7 @@ {% else %} {{ title }} - Album Art {% endif %} -
+

{% if title %} {{ title }} @@ -66,6 +66,20 @@

Artist(s) {% endif %}

+

+ {% if genre %} + {{ genre }} + {% else %} + Genre + {% endif %} + + {% if tempo %} +  |  {{ tempo }} + {% else %} +  |  Tempo + {% endif %} + +

{% if deezer == None %}