mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-06 23:21:00 +08:00
fix: update parse rule
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user