mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 05:26:09 +05:00
remove AnnTorrentsToDht opt
have issues on disable
This commit is contained in:
@@ -29,7 +29,6 @@ type BTSets struct {
|
||||
|
||||
// BT Config
|
||||
AcceptPeerCon bool `default:"true"`
|
||||
AnnTorrentsToDht bool `default:"true"`
|
||||
EnableIPv6 bool
|
||||
DisableTCP bool
|
||||
DisableUTP bool
|
||||
@@ -122,7 +121,6 @@ func loadBTSets() {
|
||||
func SetDefault() {
|
||||
sets := new(BTSets)
|
||||
sets.AcceptPeerCon = true
|
||||
sets.AnnTorrentsToDht = true
|
||||
sets.EnableDebug = false
|
||||
sets.DisableUTP = true
|
||||
sets.CacheSize = 96 * 1024 * 1024 // 96 MB
|
||||
|
||||
@@ -64,7 +64,6 @@ func (bt *BTServer) configure() {
|
||||
cliVers := userAgent //"uTorrent/2210(25302)"
|
||||
|
||||
bt.config.AcceptPeerConnections = settings.BTsets.AcceptPeerCon
|
||||
bt.config.PeriodicallyAnnounceTorrentsToDht = settings.BTsets.AnnTorrentsToDht
|
||||
bt.config.Debug = settings.BTsets.EnableDebug
|
||||
bt.config.DisableIPv6 = settings.BTsets.EnableIPv6 == false
|
||||
bt.config.DisableTCP = settings.BTsets.DisableTCP
|
||||
@@ -95,9 +94,9 @@ func (bt *BTServer) configure() {
|
||||
if settings.BTsets.PeersListenPort > 0 {
|
||||
bt.config.ListenPort = settings.BTsets.PeersListenPort
|
||||
} else {
|
||||
log.Println("Find upnp port")
|
||||
upnpport := 32000
|
||||
for {
|
||||
log.Println("Check upnp port", upnpport)
|
||||
l, err := net.Listen("tcp", ":"+strconv.Itoa(upnpport))
|
||||
if l != nil {
|
||||
l.Close()
|
||||
|
||||
@@ -9,7 +9,6 @@ export default function SecondarySettingsComponent({ settings, inputForm }) {
|
||||
|
||||
const {
|
||||
AcceptPeerCon,
|
||||
AnnTorrentsToDht,
|
||||
RetrackersMode,
|
||||
TorrentDisconnectTimeout,
|
||||
EnableIPv6,
|
||||
@@ -86,11 +85,6 @@ export default function SecondarySettingsComponent({ settings, inputForm }) {
|
||||
label={t('SettingsDialog.DHT')}
|
||||
labelPlacement='start'
|
||||
/>
|
||||
<FormControlLabel
|
||||
control={<Switch checked={AnnTorrentsToDht} onChange={inputForm} id='AnnTorrentsToDht' color='secondary' />}
|
||||
label={t('SettingsDialog.AnnTorrentsToDht')}
|
||||
labelPlacement='start'
|
||||
/>
|
||||
<FormControlLabel
|
||||
control={<Switch checked={AcceptPeerCon} onChange={inputForm} id='AcceptPeerCon' color='secondary' />}
|
||||
label={t('SettingsDialog.AcceptPeerCon')}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
export default {
|
||||
AcceptPeerCon: true,
|
||||
AnnTorrentsToDht: true,
|
||||
CacheSize: 96,
|
||||
ReaderReadAHead: 95,
|
||||
UseDisk: false,
|
||||
|
||||
Reference in New Issue
Block a user