chore: formatting

This commit is contained in:
2026-05-27 11:08:19 +02:00
parent 69cfac8c9f
commit 1076fa58b7

View File

@@ -11,6 +11,7 @@ import (
"net/url" "net/url"
"os" "os"
"regexp" "regexp"
"slices"
"strconv" "strconv"
"strings" "strings"
"time" "time"
@@ -178,12 +179,7 @@ func selectionHasClass(selection *goquery.Selection, className string) bool {
if !ok { if !ok {
return false return false
} }
for _, class := range strings.Fields(raw) { return slices.Contains(strings.Fields(raw), className)
if class == className {
return true
}
}
return false
} }
func parseWeekdayFromHeader(header string) *time.Weekday { func parseWeekdayFromHeader(header string) *time.Weekday {
@@ -218,7 +214,7 @@ func parseMeta(meta string) (episodeText string, localTime string, airType AirTy
// Find the time token(s) // Find the time token(s)
var timeIdx = -1 var timeIdx = -1
for i := 0; i < len(parts); i++ { for i := range parts {
if strings.Contains(parts[i], ":") && len(parts[i]) >= 4 { if strings.Contains(parts[i], ":") && len(parts[i]) >= 4 {
timeIdx = i timeIdx = i
break break