diff --git a/service/torrent/metainfoFetcher/metainfoFetcher.go b/service/torrent/metainfoFetcher/metainfoFetcher.go index 807bc381..179eca5f 100644 --- a/service/torrent/metainfoFetcher/metainfoFetcher.go +++ b/service/torrent/metainfoFetcher/metainfoFetcher.go @@ -196,9 +196,9 @@ func (fetcher *MetainfoFetcher) fillQueue() { } else { params = serviceBase.CreateWhereParams("((filesize IS NULL OR filesize = 0) OR (torrents.torrent_id NOT IN (SELECT files.torrent_id FROM files WHERE files.torrent_id = torrents.torrent_id))) AND date > ?", oldest) } - dbTorrents, count, err := torrentService.GetTorrents(params, fetcher.queueSize, 0) + dbTorrents, err := torrentService.GetTorrentsOrderByNoCount(¶ms, "", fetcher.queueSize, 0) - if count == 0 { + if len(dbTorrents) == 0 { log.Infof("No torrents for filesize update") return }