fix: AllDebrid webdav compatibility, and uncached downloads (#97)

This commit is contained in:
iPromKnight
2025-07-01 04:10:21 +01:00
committed by GitHub
parent 1d19be9013
commit a4ee0973cc
3 changed files with 37 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/sirrobot01/decypharr/internal/utils"
debridTypes "github.com/sirrobot01/decypharr/pkg/debrid"
"github.com/sirrobot01/decypharr/pkg/debrid/types"
"math"
"os"
"path/filepath"
"time"
@@ -207,6 +208,9 @@ func (s *Store) partialTorrentUpdate(t *Torrent, debridTorrent *types.Torrent) *
}
totalSize := debridTorrent.Bytes
progress := (cmp.Or(debridTorrent.Progress, 0.0)) / 100.0
if math.IsNaN(progress) || math.IsInf(progress, 0) {
progress = 0
}
sizeCompleted := int64(float64(totalSize) * progress)
var speed int64