fix on check
This commit is contained in:
@@ -262,10 +262,13 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent {
|
|||||||
var err error
|
var err error
|
||||||
// file cache
|
// file cache
|
||||||
torrentFromFile := t.readFromFile(rdTorrent.ID)
|
torrentFromFile := t.readFromFile(rdTorrent.ID)
|
||||||
if torrentFromFile != nil && len(torrentFromFile.ID) > 0 && len(torrentFromFile.Links) == len(rdTorrent.Links) && torrentFromFile.Links[0] == rdTorrent.Links[0] {
|
if torrentFromFile != nil && len(torrentFromFile.ID) > 0 && len(torrentFromFile.Links) == len(rdTorrent.Links) {
|
||||||
|
if (len(torrentFromFile.Links) > 0 && torrentFromFile.Links[0] == rdTorrent.Links[0]) || len(torrentFromFile.Links) == 0 {
|
||||||
// see if api data and file data still match
|
// see if api data and file data still match
|
||||||
// then it means data is still usable
|
// then it means data is still usable
|
||||||
info = torrentFromFile
|
info = torrentFromFile
|
||||||
|
info.Progress = rdTorrent.Progress
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if info == nil {
|
if info == nil {
|
||||||
info, err = t.api.GetTorrentInfo(rdTorrent.ID)
|
info, err = t.api.GetTorrentInfo(rdTorrent.ID)
|
||||||
|
|||||||
Reference in New Issue
Block a user