Multi-token support

This commit is contained in:
Ben Adrian Sarmiento
2024-06-28 04:47:43 +02:00
parent 5e06f04f33
commit 962845fb81
15 changed files with 214 additions and 108 deletions

View File

@@ -17,7 +17,7 @@ import (
)
func (t *TorrentManager) refreshTorrents(initialRun bool) {
instances, _, err := t.api.GetTorrents(false)
instances, _, err := t.rd.GetTorrents(false)
if err != nil {
t.log.Warnf("Cannot get torrents: %v", err)
return
@@ -173,7 +173,7 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *realdebrid.T
info := t.readInfoFromFile(rdTorrent.ID)
if info == nil {
var err error
info, err = t.api.GetTorrentInfo(rdTorrent.ID)
info, err = t.rd.GetTorrentInfo(rdTorrent.ID)
if err != nil {
t.log.Warnf("Cannot get info for id=%s: %v", rdTorrent.ID, err)
return nil