mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
fix(indexers): BTFiles size parsing (#1805)
* fix(indexers): btfiles size * fix: revert btfiles definition tests * fix(release): strip comma of torrentSize string before parse --------- Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
This commit is contained in:
parent
594393eaaf
commit
f4c2aef38c
1 changed files with 3 additions and 0 deletions
|
@ -690,6 +690,9 @@ func (r *Release) MapVars(def *IndexerDefinition, varMap map[string]string) erro
|
|||
}
|
||||
|
||||
if torrentSize, err := getStringMapValue(varMap, "torrentSize"); err == nil {
|
||||
// Some indexers like BTFiles announces size with comma. Humanize does not handle that well and strips it.
|
||||
torrentSize = strings.Replace(torrentSize, ",", ".", 1)
|
||||
|
||||
// handling for indexer who doesn't explicitly set which size unit is used like (AR)
|
||||
if def.IRC != nil && def.IRC.Parse != nil && def.IRC.Parse.ForceSizeUnit != "" {
|
||||
torrentSize = fmt.Sprintf("%s %s", torrentSize, def.IRC.Parse.ForceSizeUnit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue