Skip to content

Commit

Permalink
🎼 Add genre & tempo in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
CheapNightbot committed Oct 18, 2024
1 parent ff02554 commit 3a285da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down
16 changes: 15 additions & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{% else %}
<img src="{{ url_for('static', filename='favicon.svg') }}" alt="{{ title }} - Album Art" class="album-art result" style="height:33vh;width:28vh;">
{% endif %}
<div class=" result-container" style="flex-direction:column;">
<div class=" result-container" style="flex-direction:column; text-align: center;">
<h2>
{% if title %}
{{ title }}
Expand All @@ -66,6 +66,20 @@ <h3>
Artist(s)
{% endif %}
</h3>
<p>
{% if genre %}
{{ genre }}
{% else %}
Genre
{% endif %}
<span>
{% if tempo %}
&nbsp;|&nbsp; {{ tempo }}
{% else %}
&nbsp;|&nbsp; Tempo
{% endif %}
</span>
</p>
<div class="result-container" style="flex-direction:row; padding:1rem;">
<!-- Deezer Music -->
{% if deezer == None %}
Expand Down

0 comments on commit 3a285da

Please sign in to comment.