feat(indexers): btn improve parsing (#371)

* feat(indexers): btn improve parsing
This commit is contained in:
ze0s 2022-07-23 16:47:15 +02:00 committed by GitHub
parent 31441ff4c3
commit 4f3091a4a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 11 deletions

View file

@ -238,7 +238,9 @@ func (r *Release) ParseReleaseTagsString(tags string) {
if len(t.Other) > 0 {
r.Other = append(r.Other, t.Other...)
}
if r.Origin == "" && t.Origin != "" {
r.Origin = t.Origin
}
if r.Container == "" && t.Container != "" {
r.Container = t.Container
}
@ -464,6 +466,10 @@ func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) erro
r.Tags = tagArr
}
if title, err := getStringMapValue(varMap, "title"); err == nil {
r.Title = title
}
// handle releaseTags. Most of them are redundant but some are useful
if releaseTags, err := getStringMapValue(varMap, "releaseTags"); err == nil {
r.ReleaseTags = releaseTags