fix whel delete from db and getting torrent

This commit is contained in:
YouROK
2020-12-11 15:48:02 +03:00
parent 92ac53257b
commit 27675c89f2

View File

@@ -59,18 +59,20 @@ func GetTorrent(hashHex string) *Torrent {
return tor return tor
} }
tor = GetTorrentDB(hash) tr := GetTorrentDB(hash)
if tr != nil {
go func() { tor = tr
tr, _ := NewTorrent(tor.TorrentSpec, bts) go func() {
if tr != nil { tr, _ := NewTorrent(tor.TorrentSpec, bts)
tr.Title = tor.Title if tr != nil {
tr.Poster = tor.Poster tr.Title = tor.Title
tr.Size = tor.Size tr.Poster = tor.Poster
tr.Timestamp = tor.Timestamp tr.Size = tor.Size
tr.GotInfo() tr.Timestamp = tor.Timestamp
} tr.GotInfo()
}() }
}()
}
return tor return tor
} }