This commit is contained in:
2026-08-23 14:13:18 -05:00
parent 789bf91eed
commit 866f243f1b
37 changed files with 1761 additions and 58 deletions
+3 -3
View File
@@ -58,7 +58,7 @@ func (h *Web) handlePlaylist(w http.ResponseWriter, r *http.Request) {
if err != nil {
continue
}
rows = append(rows, toSongRow(h.DB, song, albumOf(h.DB, song), user.ID))
rows = append(rows, toSongRow(h.DB, song, albumOf(h.DB, song), user.ID, user.IsAdmin))
}
h.page(w, r, "playlist", "playlists", playlist.Name, struct {
Playlist *database.Playlist
@@ -109,7 +109,7 @@ func (h *Web) handleFavorites(w http.ResponseWriter, r *http.Request) {
var songs []SongRow
for _, id := range songIDs {
if s, err := database.GetSong(h.DB, id); err == nil {
songs = append(songs, toSongRow(h.DB, s, albumOf(h.DB, s), user.ID))
songs = append(songs, toSongRow(h.DB, s, albumOf(h.DB, s), user.ID, user.IsAdmin))
}
}
@@ -171,7 +171,7 @@ func (h *Web) handleRecent(w http.ResponseWriter, r *http.Request) {
if err != nil {
continue
}
rows = append(rows, toSongRow(h.DB, song, albumOf(h.DB, song), user.ID))
rows = append(rows, toSongRow(h.DB, song, albumOf(h.DB, song), user.ID, user.IsAdmin))
}
h.page(w, r, "recent", "recent", "Recently Played", rows)
}