mirror of
https://github.com/simon-ding/polaris.git
synced 2026-04-21 19:27:30 +08:00
feat: support for torrent with multi episodes
This commit is contained in:
@@ -20,6 +20,17 @@ type Info struct {
|
||||
IsSeasonPack bool
|
||||
}
|
||||
|
||||
func (m *Info) ParseExtraDescription(desc string) {
|
||||
if m.IsSeasonPack { //try to parse episode number with description
|
||||
mm := ParseTv(desc)
|
||||
if mm.StartEpisode > 0 { //sometimes they put episode info in desc text
|
||||
m.IsSeasonPack = false
|
||||
m.StartEpisode = mm.StartEpisode
|
||||
m.EndEpisode = mm.EndEpisode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (m *Info) IsAcceptable(names ...string) bool {
|
||||
for _, name := range names {
|
||||
re := regexp.MustCompile(`[^\p{L}\w\s]`)
|
||||
|
||||
Reference in New Issue
Block a user