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

@@ -35,7 +35,7 @@ func (t *TorrentManager) setNewLatestState(checksum LibraryState) {
func (t *TorrentManager) getCurrentState() LibraryState {
var state LibraryState
torrents, totalCount, err := t.api.GetTorrents(true)
torrents, totalCount, err := t.rd.GetTorrents(true)
if err != nil {
t.log.Errorf("Checksum API Error (GetTorrents): %v", err)
return LibraryState{}
@@ -45,7 +45,7 @@ func (t *TorrentManager) getCurrentState() LibraryState {
state.FirstTorrentId = torrents[0].ID
}
count, err := t.api.GetActiveTorrentCount()
count, err := t.rd.GetActiveTorrentCount()
if err != nil {
t.log.Errorf("Checksum API Error (GetActiveTorrentCount): %v", err)
return LibraryState{}