Fix logic of fetching torrents

This commit is contained in:
Ben Sarmiento
2024-05-06 10:48:01 +02:00
parent b6b59b22e6
commit ae94252156
11 changed files with 205 additions and 49 deletions

View File

@@ -23,7 +23,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.api.GetTorrents(true)
if err != nil {
t.log.Errorf("Checksum API Error (GetTorrents): %v", err)
return LibraryState{}
@@ -33,7 +33,7 @@ func (t *TorrentManager) getCurrentState() LibraryState {
state.FirstTorrentId = torrents[0].ID
}
count, err := t.Api.GetActiveTorrentCount()
count, err := t.api.GetActiveTorrentCount()
if err != nil {
t.log.Errorf("Checksum API Error (GetActiveTorrentCount): %v", err)
return LibraryState{}