Filter admin streams from view

This commit is contained in:
Salastil
2025-11-23 00:38:09 -05:00
parent 661ce59d9c
commit 5afa624af0

View File

@@ -97,6 +97,17 @@ func formatViewerCount(count int) string {
return fmt.Sprintf("%d", count) return fmt.Sprintf("%d", count)
} }
func filterStreams(streams []Stream) []Stream {
filtered := streams[:0]
for _, st := range streams {
if strings.EqualFold(st.Source, "admin") {
continue
}
filtered = append(filtered, st)
}
return filtered
}
// ──────────────────────────────── // ────────────────────────────────
// MODEL // MODEL
// ──────────────────────────────── // ────────────────────────────────
@@ -502,7 +513,7 @@ func (m Model) fetchStreamsForMatch(mt Match) tea.Cmd {
if err != nil { if err != nil {
return errorMsg(err) return errorMsg(err)
} }
return streamsLoadedMsg(streams) return streamsLoadedMsg(filterStreams(streams))
} }
} }