mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
add PeriodicallyAnnounceTorrentsToDht opt
This commit is contained in:
@@ -29,6 +29,7 @@ type BTSets struct {
|
|||||||
|
|
||||||
// BT Config
|
// BT Config
|
||||||
AcceptPeerCon bool
|
AcceptPeerCon bool
|
||||||
|
AnnTorrentsToDht bool
|
||||||
EnableIPv6 bool
|
EnableIPv6 bool
|
||||||
DisableTCP bool
|
DisableTCP bool
|
||||||
DisableUTP bool
|
DisableUTP bool
|
||||||
@@ -121,6 +122,7 @@ func loadBTSets() {
|
|||||||
func SetDefault() {
|
func SetDefault() {
|
||||||
sets := new(BTSets)
|
sets := new(BTSets)
|
||||||
sets.AcceptPeerCon = true
|
sets.AcceptPeerCon = true
|
||||||
|
sets.AnnTorrentsToDht = true
|
||||||
sets.EnableDebug = false
|
sets.EnableDebug = false
|
||||||
sets.DisableUTP = true
|
sets.DisableUTP = true
|
||||||
sets.CacheSize = 96 * 1024 * 1024 // 96 MB
|
sets.CacheSize = 96 * 1024 * 1024 // 96 MB
|
||||||
|
|||||||
@@ -64,8 +64,7 @@ func (bt *BTServer) configure() {
|
|||||||
cliVers := userAgent //"uTorrent/2210(25302)"
|
cliVers := userAgent //"uTorrent/2210(25302)"
|
||||||
|
|
||||||
bt.config.AcceptPeerConnections = settings.BTsets.AcceptPeerCon
|
bt.config.AcceptPeerConnections = settings.BTsets.AcceptPeerCon
|
||||||
bt.config.PeriodicallyAnnounceTorrentsToDht = false
|
bt.config.PeriodicallyAnnounceTorrentsToDht = settings.BTsets.AnnTorrentsToDht
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export default function SecondarySettingsComponent({ settings, inputForm }) {
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
AcceptPeerCon,
|
AcceptPeerCon,
|
||||||
|
AnnTorrentsToDht,
|
||||||
RetrackersMode,
|
RetrackersMode,
|
||||||
TorrentDisconnectTimeout,
|
TorrentDisconnectTimeout,
|
||||||
EnableIPv6,
|
EnableIPv6,
|
||||||
@@ -85,6 +86,11 @@ export default function SecondarySettingsComponent({ settings, inputForm }) {
|
|||||||
label={t('SettingsDialog.DHT')}
|
label={t('SettingsDialog.DHT')}
|
||||||
labelPlacement='start'
|
labelPlacement='start'
|
||||||
/>
|
/>
|
||||||
|
<FormControlLabel
|
||||||
|
control={<Switch checked={AnnTorrentsToDht} onChange={inputForm} id='AnnTorrentsToDht' color='secondary' />}
|
||||||
|
label={t('SettingsDialog.AnnTorrentsToDht')}
|
||||||
|
labelPlacement='start'
|
||||||
|
/>
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
control={<Switch checked={AcceptPeerCon} onChange={inputForm} id='AcceptPeerCon' color='secondary' />}
|
control={<Switch checked={AcceptPeerCon} onChange={inputForm} id='AcceptPeerCon' color='secondary' />}
|
||||||
label={t('SettingsDialog.AcceptPeerCon')}
|
label={t('SettingsDialog.AcceptPeerCon')}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
AcceptPeerCon: true,
|
AcceptPeerCon: true,
|
||||||
|
AnnTorrentsToDht: true,
|
||||||
CacheSize: 96,
|
CacheSize: 96,
|
||||||
ReaderReadAHead: 95,
|
ReaderReadAHead: 95,
|
||||||
UseDisk: false,
|
UseDisk: false,
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
"SelectSeason": "Select Season",
|
"SelectSeason": "Select Season",
|
||||||
"SettingsDialog": {
|
"SettingsDialog": {
|
||||||
"AcceptPeerCon": "Accept Peer Connections",
|
"AcceptPeerCon": "Accept Peer Connections",
|
||||||
|
"AnnTorrentsToDht": "Periodically Announce Torrents To DHT",
|
||||||
"AddRetrackers": "Add retrackers",
|
"AddRetrackers": "Add retrackers",
|
||||||
"AdditionalSettings": "Additional Settings",
|
"AdditionalSettings": "Additional Settings",
|
||||||
"CacheBeforeReaderDesc": "from cache will be saved before currently played frame",
|
"CacheBeforeReaderDesc": "from cache will be saved before currently played frame",
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
"SelectSeason": "Выбор сезона",
|
"SelectSeason": "Выбор сезона",
|
||||||
"SettingsDialog": {
|
"SettingsDialog": {
|
||||||
"AcceptPeerCon": "Принимать входящие соединения",
|
"AcceptPeerCon": "Принимать входящие соединения",
|
||||||
|
"AnnTorrentsToDht": "Анонсировать торренты по DHT",
|
||||||
"AddRetrackers": "Добавлять",
|
"AddRetrackers": "Добавлять",
|
||||||
"AdditionalSettings": "Дополнительные настройки",
|
"AdditionalSettings": "Дополнительные настройки",
|
||||||
"CacheBeforeReaderDesc": "от кеша будет оставаться позади воспроизводимого кадра",
|
"CacheBeforeReaderDesc": "от кеша будет оставаться позади воспроизводимого кадра",
|
||||||
|
|||||||
Reference in New Issue
Block a user