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 {
|
if sets.ReadOnly {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
sets.SetBTSets(set)
|
||||||
log.TLogln("drop all torrents")
|
log.TLogln("drop all torrents")
|
||||||
dropAllTorrent()
|
dropAllTorrent()
|
||||||
time.Sleep(time.Second * 2)
|
time.Sleep(time.Second * 2)
|
||||||
log.TLogln("disconect")
|
log.TLogln("disconect")
|
||||||
bts.Disconnect()
|
bts.Disconnect()
|
||||||
sets.SetBTSets(set)
|
|
||||||
log.TLogln("connect")
|
log.TLogln("connect")
|
||||||
bts.Connect()
|
bts.Connect()
|
||||||
time.Sleep(time.Second * 2)
|
time.Sleep(time.Second * 2)
|
||||||
@@ -209,12 +209,12 @@ func SetDefSettings() {
|
|||||||
if sets.ReadOnly {
|
if sets.ReadOnly {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
sets.SetDefault()
|
||||||
log.TLogln("drop all torrents")
|
log.TLogln("drop all torrents")
|
||||||
dropAllTorrent()
|
dropAllTorrent()
|
||||||
time.Sleep(time.Second * 2)
|
time.Sleep(time.Second * 2)
|
||||||
log.TLogln("disconect")
|
log.TLogln("disconect")
|
||||||
bts.Disconnect()
|
bts.Disconnect()
|
||||||
sets.SetDefault()
|
|
||||||
log.TLogln("connect")
|
log.TLogln("connect")
|
||||||
bts.Connect()
|
bts.Connect()
|
||||||
time.Sleep(time.Second * 2)
|
time.Sleep(time.Second * 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user