Files
decypharr/pkg/qbit/misc.go
Mukhtar Akere af067cace9 Changelog 0.6.0
2025-04-16 17:31:50 +01:00

28 lines
574 B
Go

package qbit
import (
"github.com/sirrobot01/decypharr/internal/utils"
"strings"
)
func createTorrentFromMagnet(magnet *utils.Magnet, category, source string) *Torrent {
torrent := &Torrent{
ID: "",
Hash: strings.ToLower(magnet.InfoHash),
Name: magnet.Name,
Size: magnet.Size,
Category: category,
Source: source,
State: "downloading",
MagnetUri: magnet.Link,
Tracker: "udp://tracker.opentrackr.org:1337",
UpLimit: -1,
DlLimit: -1,
AutoTmm: false,
Ratio: 1,
RatioLimit: 1,
}
return torrent
}