fixes?; downloading tracks with metadata (restream required)

This commit is contained in:
Laptop
2024-11-29 00:36:21 +02:00
parent 8ef6813018
commit 5f7f2fd0f4
14 changed files with 289 additions and 132 deletions

View File

@@ -51,7 +51,7 @@ templ Playlist(prefs cfg.Preferences, p sc.Playlist) {
<br/>
<div>
for _, track := range p.Tracks {
@TrackItem(track, true)
@TrackItem(&track, true)
}
</div>
if len(p.MissingTracks) != 0 {

View File

@@ -82,8 +82,11 @@ templ Track(prefs cfg.Preferences, t sc.Track, stream string, displayErr string)
}
@UserItem(&t.Author)
//<div class="btns">
<div style="display: flex;">
<div style="display: flex; gap: 1rem">
<a class="btn" href={ templ.URL("https://soundcloud.com/" + t.Author.Permalink + "/" + t.Permalink) }>view on soundcloud</a>
if cfg.Restream {
<a class="btn" href={ templ.URL("/_/restream/" + t.Author.Permalink + "/" + t.Permalink+"?metadata=true") } download={t.Author.Username + " - " + t.Title + ".mp3"}>download</a>
}
</div>
<br/>
if t.Description != "" {