package templates
import (
"git.maid.zone/stuff/soundcloak/lib/cfg"
"git.maid.zone/stuff/soundcloak/lib/sc"
"net/url"
"strconv"
"strings"
)
templ PlaylistHeader(p sc.Playlist) {
}
func playlist(t sc.Track, p sc.Playlist) string {
return t.Href() + "?playlist=" + p.Href()[1:]
}
templ PlaylistItem(playlist *sc.Playlist, showUsername bool) {
if playlist.Artwork != "" {
} else {
}
}
templ Playlist(prefs cfg.Preferences, p sc.Playlist) {
if p.Artwork != "" {
}
{ strconv.FormatInt(p.TracksCount(), 10) } tracks
Tags: { strings.Join(sc.TagListParser(p.TagList), ", ") }
}{ strconv.FormatInt(p.Likes, 10) } likes
Created: { p.CreatedAt }
} if p.LastModified != "" {Last modified: { p.LastModified }
}no more results
} } else { for _, playlist := range p.Collection { @PlaylistItem(playlist, true) } if p.Next != "" && len(p.Collection) != int(p.Total) { more playlists } } }