mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 05:26:09 +05:00
Merge pull request #116 from skunkie/issue-115
fix a delay when saving settings
This commit is contained in:
@@ -193,12 +193,12 @@ func SetSettings(set *sets.BTSets) {
|
||||
if sets.ReadOnly {
|
||||
return
|
||||
}
|
||||
sets.SetBTSets(set)
|
||||
log.TLogln("drop all torrents")
|
||||
dropAllTorrent()
|
||||
time.Sleep(time.Second * 2)
|
||||
log.TLogln("disconect")
|
||||
bts.Disconnect()
|
||||
sets.SetBTSets(set)
|
||||
log.TLogln("connect")
|
||||
bts.Connect()
|
||||
time.Sleep(time.Second * 2)
|
||||
@@ -209,12 +209,12 @@ func SetDefSettings() {
|
||||
if sets.ReadOnly {
|
||||
return
|
||||
}
|
||||
sets.SetDefault()
|
||||
log.TLogln("drop all torrents")
|
||||
dropAllTorrent()
|
||||
time.Sleep(time.Second * 2)
|
||||
log.TLogln("disconect")
|
||||
bts.Disconnect()
|
||||
sets.SetDefault()
|
||||
log.TLogln("connect")
|
||||
bts.Connect()
|
||||
time.Sleep(time.Second * 2)
|
||||
|
||||
Reference in New Issue
Block a user