mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-21 14:36:09 +05:00
update
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +100,8 @@ func (bt *BTServer) configure() {
|
||||
bt.config.ListenPort = settings.BTsets.PeersListenPort
|
||||
}
|
||||
|
||||
bt.config.DefaultRequestStrategy = torrent.RequestStrategyFuzzing()
|
||||
|
||||
log.Println("Configure client:", settings.BTsets)
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ func AddTorrentDB(torr *Torrent) {
|
||||
t.Name = torr.Name()
|
||||
t.Title = torr.Title
|
||||
t.Poster = torr.Poster
|
||||
t.Size = torr.Size
|
||||
t.Timestamp = time.Now().Unix()
|
||||
settings.AddTorrent(t)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user