This commit is contained in:
YouROK
2020-11-30 23:04:49 +03:00
parent f1aa7858f2
commit 0569ade7b8
7 changed files with 35 additions and 30 deletions

View File

@@ -3,6 +3,7 @@ package torr
import (
"os"
"sort"
"time"
"server/log"
sets "server/settings"
@@ -57,6 +58,7 @@ func GetTorrent(hashHex string) *Torrent {
hash := metainfo.NewHashFromHex(hashHex)
tor := bts.GetTorrent(hash)
if tor != nil {
tor.expiredTime = time.Now().Add(time.Minute)
return tor
}