fix(indexer): panic on size check via api (#239)

* fix(indexer): panic on size check via api

* feat(indexer): add mock api
This commit is contained in:
Ludvig Lundgren 2022-04-12 16:45:46 +02:00 committed by GitHub
parent 824aecafdf
commit 9e5b7b0aa5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 91 additions and 58 deletions

View file

@ -123,6 +123,7 @@ func (t TorrentBasic) ReleaseSizeBytes() uint64 {
releaseSizeBytes, err := humanize.ParseBytes(t.Size)
if err != nil {
// log could not parse into bytes
return 0
}
return releaseSizeBytes
}