package templates
// Admin all-podcasts view (§0 item 8 / Phase-4 item 1): EVERY feed from
// EVERY user with its maintenance aggregates, sorted by disk usage.
// The maintenance surface for the podcast subsystem — files are the
// disk hogs, so the hogs surface first. Actions: Refresh (re-fetch),
// Delete files (rows → pending, disk freed), Remove feed (rows + files
// + subscriptions gone — the same admin delete the detail page offers).
// AdminPodcastFeedData is one row of the admin all-podcasts table.
type AdminPodcastFeedData struct {
ID string
Title string
Host string
LibraryName string
Subscribers int
SubscriberNames string
EpisodeTotal int
EpisodeDownloaded int
DiskBytes int64
LastFetched string
}
templ AdminPodcasts(user User, feeds []AdminPodcastFeedData, totalFeeds int, totalDownloaded int, totalEpisodes int, totalBytes int64) {
All Podcasts - Bookhoard
@Header(user, "/admin/podcasts")
All Podcasts
{ podcastInt(totalFeeds) } feeds · { podcastInt(totalDownloaded) }/{ podcastInt(totalEpisodes) } episodes downloaded · { FormatEpisodeSize(totalBytes) } on disk
Maintenance view: every feed from every user. "Delete files" frees the disk and
resets episodes to pending (they re-download on demand — a feed refresh will NOT
re-materialize them). "Remove feed" deletes rows, files and subscriptions for everyone.