mirror of
https://github.com/simon-ding/polaris.git
synced 2026-03-09 19:20:46 +08:00
updates
This commit is contained in:
17
pkg/metadata/doc.go
Normal file
17
pkg/metadata/doc.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package metadata
|
||||
|
||||
/*
|
||||
tv name examples
|
||||
|
||||
Cowboy Cartel S01E02 XviD-AFG [eztv]
|
||||
The.Bold.and.the.Beautiful.S37E219.XviD-AFG
|
||||
As Husband As Wife 2024 S01E05-E06 1080p WEB-DL HEVC DDP 2Audios-QHstudIo
|
||||
Twinkle Love 2024 S04 Complete 2160p WEB-DL HEVC AAC-QHstudIo
|
||||
One Punch Man S2 - 08 [1080p].mkv
|
||||
|
||||
[千夏字幕组][小市民系列_Shoushimin Series][第03话][1080p_HEVC][简繁内封][招募新人]
|
||||
[OPFans楓雪動漫][ONE PIECE 海賊王][第1113話][周日版][1080p][MP4][簡體]
|
||||
[桜都字幕组] 亦叶亦花 / Nanare Hananare [04][1080p][简体内嵌]
|
||||
[ANi] 戰國妖狐 千魔混沌篇 - 16 [1080P][Baha][WEB-DL][AAC AVC][CHT][MP4]
|
||||
[ANi] 這是妳與我的最後戰場,或是開創世界的聖戰 第二季 - 04 [1080P][Baha][WEB-DL][AAC AVC][CHT][MP4]
|
||||
*/
|
||||
10
pkg/metadata/tv_test.go
Normal file
10
pkg/metadata/tv_test.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package metadata
|
||||
|
||||
var tvEnNames = []string{
|
||||
"As Husband As Wife 2024 S01E05-E06 1080p WEB-DL HEVC DDP 2Audios-QHstudIo",
|
||||
"Twinkle Love 2024 S04 Complete 2160p WEB-DL HEVC AAC-QHstudIo",
|
||||
}
|
||||
|
||||
var tvCnNames = []string{
|
||||
|
||||
}
|
||||
@@ -112,21 +112,6 @@ func FindSeasonPackageInfo(name string) (se int, err error) {
|
||||
return se, err
|
||||
}
|
||||
|
||||
func IsSeasonPackageName(name string) bool {
|
||||
seRe := regexp.MustCompile(`S\d+`)
|
||||
epRe := regexp.MustCompile(`E\d+`)
|
||||
nameUpper := strings.ToUpper(name)
|
||||
matchEp := epRe.FindAllString(nameUpper, -1)
|
||||
if len(matchEp) != 0 {
|
||||
return false //episode number should not exist
|
||||
}
|
||||
matchSe := seRe.FindAllString(nameUpper, -1)
|
||||
if len(matchSe) == 0 {
|
||||
return false //no season num
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func ContainsIgnoreCase(s, substr string) bool {
|
||||
return strings.Contains(strings.ToLower(s), strings.ToLower(substr))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user