fix(indexers): improve animebytes parsing (#477)

* Fixed typo for "Aweomse Raw Novel"
Added one missing whitespace after "manga" tag for "Awesome Live Action Special" test
Changed regex expression to fix AB parsing

* Fixed regex to acknowledge "uploader" var in case there is no tags in the announce.
Added test line for announces without tags.

* chore: update rls package

* fix(release): don't overwrite season and episode
This commit is contained in:
xoaaC 2022-10-13 20:35:48 +02:00 committed by GitHub
parent bc335ccf1f
commit 2777f8c3cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 34 deletions

View file

@ -162,8 +162,7 @@ func (p *IndexerParse) ParseMatch(vars map[string]string, extraVars map[string]s
}
var urlBytes bytes.Buffer
err = tmpl.Execute(&urlBytes, &tmpVars)
if err != nil {
if err := tmpl.Execute(&urlBytes, &tmpVars); err != nil {
return errors.New("could not write torrent url template output")
}
@ -178,8 +177,7 @@ func (p *IndexerParse) ParseMatch(vars map[string]string, extraVars map[string]s
}
var nameBytes bytes.Buffer
err = tmplName.Execute(&nameBytes, &tmpVars)
if err != nil {
if err := tmplName.Execute(&nameBytes, &tmpVars); err != nil {
return errors.New("could not write torrent name template output")
}

View file

@ -192,8 +192,6 @@ func (r *Release) ParseString(title string) {
r.Title = rel.Title
r.Source = rel.Source
r.Resolution = rel.Resolution
r.Season = rel.Series
r.Episode = rel.Episode
r.Region = rel.Region
r.Audio = rel.Audio
r.AudioChannels = rel.Channels
@ -203,6 +201,13 @@ func (r *Release) ParseString(title string) {
r.Other = rel.Other
r.Artists = rel.Artist
if r.Season == 0 {
r.Season = rel.Series
}
if r.Episode == 0 {
r.Episode = rel.Episode
}
if r.Year == 0 {
r.Year = rel.Year
}