mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-06 23:21:00 +08:00
feat: show episode resource
This commit is contained in:
@@ -112,25 +112,25 @@ func parseEnglishName(name string) *Metadata {
|
||||
}
|
||||
} else { //no episode, maybe like One Punch Man S2 - 08 [1080p].mkv
|
||||
|
||||
numRe := regexp.MustCompile(`^\d{1,2}$`)
|
||||
for i, p := range newSplits {
|
||||
if numRe.MatchString(p) {
|
||||
if i > 0 && strings.Contains(newSplits[i-1], "season") { //last word cannot be season
|
||||
continue
|
||||
}
|
||||
if i < seasonIndex {
|
||||
//episode number most likely should comes alfter season number
|
||||
continue
|
||||
}
|
||||
//episodeIndex = i
|
||||
n, err := strconv.Atoi(p)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("convert %s error: %v", p, err))
|
||||
}
|
||||
meta.Episode = n
|
||||
// numRe := regexp.MustCompile(`^\d{1,2}$`)
|
||||
// for i, p := range newSplits {
|
||||
// if numRe.MatchString(p) {
|
||||
// if i > 0 && strings.Contains(newSplits[i-1], "season") { //last word cannot be season
|
||||
// continue
|
||||
// }
|
||||
// if i < seasonIndex {
|
||||
// //episode number most likely should comes alfter season number
|
||||
// continue
|
||||
// }
|
||||
// //episodeIndex = i
|
||||
// n, err := strconv.Atoi(p)
|
||||
// if err != nil {
|
||||
// panic(fmt.Sprintf("convert %s error: %v", p, err))
|
||||
// }
|
||||
// meta.Episode = n
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
if resIndex != -1 {
|
||||
|
||||
Reference in New Issue
Block a user