Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions freetar/templates/tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,19 @@ <h5>
no capo
{% endif %}
</div>

<div class="col-sm col-lg-12">
<div class="col-sm col-md-9 col-lg-9">
{% if tab.tuning %}
Tuning: {{ tab.tuning }}<br>
{% endif %}
</div>

<div class="col-sm col-md-3 col-lg-3">
Author:
{% if tab.author != "Unregistered" %}
<a class="d-print-none" href="https://ultimate-guitar.com/u/{{ tab.author }}?no_redirect">{{ tab.author }}</a>
{% else %}
unregistered
{% endif %}
</div>

<div class="d-flex align-items-center d-print-none flex-wrap">
<div class="form-check form-switch autoscroll me-4">
Expand All @@ -52,6 +58,7 @@ <h5>
<span role="button" id="transpose_down" title="transpose down" class="m-2">↓</span>
<span role="button" id="transpose_up" title="transpose up" class="m-2">↑</span>
</div>
</div>
</div>

<hr class="border border-primary"/>
Expand Down
2 changes: 2 additions & 0 deletions freetar/ug.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class SongDetail():
difficulty: str
capo: str
tuning: str
author: str
tab_url: str
alternatives: list[SearchResult] = field(default_factory=list)

Expand All @@ -70,6 +71,7 @@ def __init__(self, data: dict):
self.capo = data["store"]["page"]["data"]["tab_view"]["meta"].get("capo")
_tuning = data["store"]["page"]["data"]["tab_view"]["meta"].get("tuning")
self.tuning = f"{_tuning['value']} ({_tuning['name']})" if _tuning else None
self.author = data["store"]["page"]["data"]["tab"]["username"]
self.tab_url = data["store"]["page"]["data"]["tab"]["tab_url"]
self.alternatives = []
for alternative in data["store"]["page"]["data"]["tab_view"]["versions"]:
Expand Down