Remove firefox puppeteer fallback
This commit is contained in:
+8
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user