mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
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:
parent
bc335ccf1f
commit
2777f8c3cd
6 changed files with 33 additions and 34 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue