feat(indexers): animebytes parse group and category (#327)

* refactor(AB): get releaseGroup

* feat(AB): match category
This commit is contained in:
varoOP 2022-07-06 18:31:52 +05:30 committed by GitHub
parent 97020a957c
commit 95ff83cd3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 6 deletions

View file

@ -190,7 +190,6 @@ func (r *Release) ParseString(title string) {
r.Resolution = rel.Resolution
r.Season = rel.Series
r.Episode = rel.Episode
r.Group = rel.Group
r.Region = rel.Region
r.Audio = rel.Audio
r.AudioChannels = rel.Channels
@ -204,6 +203,10 @@ func (r *Release) ParseString(title string) {
r.Year = rel.Year
}
if r.Group == "" {
r.Group = rel.Group
}
r.ParseReleaseTagsString(r.ReleaseTags)
return
@ -466,6 +469,10 @@ func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) erro
r.Resolution = resolution
}
if releaseGroup, err := getStringMapValue(varMap, "releaseGroup"); err == nil {
r.Group = releaseGroup
}
return nil
}