Remove firefox puppeteer fallback

This commit is contained in:
Salastil
2025-11-22 20:34:29 -05:00
parent e5d769d59b
commit 9df8c33e5e
5 changed files with 329 additions and 128 deletions
+8 -4
View File
@@ -107,13 +107,13 @@ type Model struct {
// ENTRY POINT
// ────────────────────────────────
func Run() error {
p := tea.NewProgram(New(), tea.WithAltScreen())
func Run(debug bool) error {
p := tea.NewProgram(New(debug), tea.WithAltScreen())
_, err := p.Run()
return err
}
func New() Model {
func New(debug bool) Model {
base := BaseURLFromEnv()
client := NewClient(base, 15*time.Second)
styles := NewStyles()
@@ -128,6 +128,10 @@ func New() Model {
debugLines: []string{},
}
if debug {
m.currentView = viewDebug
}
m.sports = NewListColumn[Sport]("Sports", func(s Sport) string { return s.Name })
m.matches = NewListColumn[Match]("Popular Matches", func(mt Match) string {
when := time.UnixMilli(mt.Date).Local().Format("Jan 2 15:04")
@@ -452,7 +456,7 @@ func (m Model) runExtractor(st Stream) tea.Cmd {
}
}
logcb(fmt.Sprintf("[extractor] Starting Chrome-based extractor for %s", st.EmbedURL))
logcb(fmt.Sprintf("[extractor] Starting puppeteer extractor for %s", st.EmbedURL))
m3u8, hdrs, err := extractM3U8Lite(st.EmbedURL, func(line string) {
m.debugLines = append(m.debugLines, line)