fix: update parse rule

This commit is contained in:
Simon Ding
2025-04-28 11:06:59 +08:00
parent 04dcbf04e7
commit b81c5d327c
2 changed files with 10 additions and 1 deletions

View File

@@ -272,7 +272,7 @@ func matchResolution(s string) string {
func maybeSeasonPack(s string) bool {
//season pack
packRe := regexp.MustCompile(`((\d{1,2}-\d{1,2}))|(complete)|(全集)`)
packRe := regexp.MustCompile(`((\d{1,2}-\d{1,2}))|(complete)|(全集)|(\W[sS]\d{1,2}\W)`)
if packRe.MatchString(s) {
return true
}

View File

@@ -197,6 +197,15 @@ func Test_ParseTV18(t *testing.T) {
//assert.Equal(t, "720p", m.Resolution)
}
//The Count of Monte Cristo 2024 S01 1080p WEB-DL DD 5.1 H.264-playWEB
func Test_ParseTV20(t *testing.T) {
s1 := "The Count of Monte Cristo 2024 S01 1080p WEB-DL DD 5.1 H.264-playWEB "
m := ParseTv(s1)
log.Infof("results: %+v", m)
assert.Equal(t, 1, m.Season)
assert.Equal(t, true, m.IsSeasonPack)
}
// The Day of the Jackal (Season 1) WEB-DL 1080p
func Test_ParseTV19(t *testing.T) {
s1 := "The Day of the Jackal (Season 1) WEB-DL 1080p "