Use main thread when unrestricting
This commit is contained in:
@@ -319,12 +319,7 @@ func (t *TorrentManager) TriggerHookOnLibraryUpdate(updatedPaths []string) {
|
|||||||
|
|
||||||
// proxy
|
// proxy
|
||||||
func (t *TorrentManager) UnrestrictUntilOk(link string) *realdebrid.Download {
|
func (t *TorrentManager) UnrestrictUntilOk(link string) *realdebrid.Download {
|
||||||
retChan := make(chan *realdebrid.Download, 1)
|
return t.Api.UnrestrictUntilOk(link, t.Config.ShouldServeFromRclone())
|
||||||
defer close(retChan)
|
|
||||||
t.workerPool.Submit(func() {
|
|
||||||
retChan <- t.Api.UnrestrictUntilOk(link, t.Config.ShouldServeFromRclone())
|
|
||||||
})
|
|
||||||
return <-retChan
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TorrentManager) SetNewLatestState(checksum LibraryState) {
|
func (t *TorrentManager) SetNewLatestState(checksum LibraryState) {
|
||||||
|
|||||||
Reference in New Issue
Block a user