mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
cosmetics
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
type BTSets struct {
|
type BTSets struct {
|
||||||
// Cache
|
// Cache
|
||||||
CacheSize int64 // in byte, def 96 MB
|
CacheSize int64 // in byte, def 64 MB
|
||||||
ReaderReadAHead int // in percent, 5%-100%, [...S__X__E...] [S-E] not clean
|
ReaderReadAHead int // in percent, 5%-100%, [...S__X__E...] [S-E] not clean
|
||||||
PreloadCache int // in percent
|
PreloadCache int // in percent
|
||||||
|
|
||||||
@@ -123,9 +123,9 @@ func SetDefault() {
|
|||||||
sets.EnableDebug = false
|
sets.EnableDebug = false
|
||||||
sets.CacheSize = 64 * 1024 * 1024 // 64 MB
|
sets.CacheSize = 64 * 1024 * 1024 // 64 MB
|
||||||
sets.PreloadCache = 50
|
sets.PreloadCache = 50
|
||||||
sets.ConnectionsLimit = 23
|
sets.ConnectionsLimit = 25
|
||||||
sets.RetrackersMode = 1
|
sets.RetrackersMode = 1
|
||||||
sets.TorrentDisconnectTimeout = 30
|
sets.TorrentDisconnectTimeout = 30
|
||||||
sets.ReaderReadAHead = 95 // 95% preload
|
sets.ReaderReadAHead = 95 // 95%
|
||||||
BTsets = sets
|
BTsets = sets
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import (
|
|||||||
"server/settings"
|
"server/settings"
|
||||||
"server/torr/storage/torrstor"
|
"server/torr/storage/torrstor"
|
||||||
"server/torr/utils"
|
"server/torr/utils"
|
||||||
|
"server/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BTServer struct {
|
type BTServer struct {
|
||||||
@@ -59,12 +60,13 @@ func (bt *BTServer) configure() {
|
|||||||
bt.storage = torrstor.NewStorage(settings.BTsets.CacheSize)
|
bt.storage = torrstor.NewStorage(settings.BTsets.CacheSize)
|
||||||
bt.config.DefaultStorage = bt.storage
|
bt.config.DefaultStorage = bt.storage
|
||||||
|
|
||||||
userAgent := "qBittorrent/4.3.2"
|
userAgent := "qBittorrent/4.3.9"
|
||||||
peerID := "-qB4320-"
|
peerID := "-qB4390-"
|
||||||
upnpID := "TorrServer"
|
upnpID := "TorrServer/" + version.Version
|
||||||
cliVers := userAgent //"uTorrent/2210(25302)"
|
cliVers := userAgent
|
||||||
|
|
||||||
// bt.config.AlwaysWantConns = true
|
// bt.config.AcceptPeerConnections = false
|
||||||
|
// bt.config.AlwaysWantConns = true
|
||||||
bt.config.Debug = settings.BTsets.EnableDebug
|
bt.config.Debug = settings.BTsets.EnableDebug
|
||||||
bt.config.DisableIPv6 = settings.BTsets.EnableIPv6 == false
|
bt.config.DisableIPv6 = settings.BTsets.EnableIPv6 == false
|
||||||
bt.config.DisableTCP = settings.BTsets.DisableTCP
|
bt.config.DisableTCP = settings.BTsets.DisableTCP
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ export default {
|
|||||||
UseDisk: false,
|
UseDisk: false,
|
||||||
UploadRateLimit: 0,
|
UploadRateLimit: 0,
|
||||||
TorrentsSavePath: '',
|
TorrentsSavePath: '',
|
||||||
ConnectionsLimit: 23,
|
ConnectionsLimit: 25,
|
||||||
DhtConnectionLimit: 0,
|
|
||||||
DisableDHT: false,
|
DisableDHT: false,
|
||||||
DisablePEX: false,
|
DisablePEX: false,
|
||||||
DisableTCP: false,
|
DisableTCP: false,
|
||||||
|
|||||||
@@ -96,7 +96,6 @@
|
|||||||
"ConnectionsLimit": "Connections Limit",
|
"ConnectionsLimit": "Connections Limit",
|
||||||
"ConnectionsLimitHint": "20-25 recommended",
|
"ConnectionsLimitHint": "20-25 recommended",
|
||||||
"DHT": "DHT (Distributed Hash Table)",
|
"DHT": "DHT (Distributed Hash Table)",
|
||||||
"DhtConnectionLimit": "DHT Connection Limit",
|
|
||||||
"Disk": "Disk",
|
"Disk": "Disk",
|
||||||
"DLNA": "DLNA Media Server",
|
"DLNA": "DLNA Media Server",
|
||||||
"DontAddRetrackers": "Don`t add retrackers",
|
"DontAddRetrackers": "Don`t add retrackers",
|
||||||
|
|||||||
@@ -96,7 +96,6 @@
|
|||||||
"ConnectionsLimit": "Торрент-соединения",
|
"ConnectionsLimit": "Торрент-соединения",
|
||||||
"ConnectionsLimitHint": "рекомендуется 20-25",
|
"ConnectionsLimitHint": "рекомендуется 20-25",
|
||||||
"DHT": "DHT (Distributed Hash Table)",
|
"DHT": "DHT (Distributed Hash Table)",
|
||||||
"DhtConnectionLimit": "Лимит подключений DHT",
|
|
||||||
"Disk": "ПЗУ / Накопитель",
|
"Disk": "ПЗУ / Накопитель",
|
||||||
"DLNA": "DLNA-медиасервер",
|
"DLNA": "DLNA-медиасервер",
|
||||||
"DontAddRetrackers": "Ничего не делать",
|
"DontAddRetrackers": "Ничего не делать",
|
||||||
|
|||||||
@@ -96,7 +96,6 @@
|
|||||||
"ConnectionsLimit": "Обмеження з'єдань",
|
"ConnectionsLimit": "Обмеження з'єдань",
|
||||||
"ConnectionsLimitHint": "рекомендовано 20-25",
|
"ConnectionsLimitHint": "рекомендовано 20-25",
|
||||||
"DHT": "DHT (Distributed Hash Table)",
|
"DHT": "DHT (Distributed Hash Table)",
|
||||||
"DhtConnectionLimit": "Обмеження з'єдань DHT",
|
|
||||||
"Disk": "ПЗП / Носій",
|
"Disk": "ПЗП / Носій",
|
||||||
"DLNA": "DLNA-медиасервер",
|
"DLNA": "DLNA-медиасервер",
|
||||||
"DontAddRetrackers": "Нічого не робити",
|
"DontAddRetrackers": "Нічого не робити",
|
||||||
|
|||||||
Reference in New Issue
Block a user