Use main thread when unrestricting

This commit is contained in:
Ben Sarmiento
2023-12-03 12:23:39 +01:00
parent 74d5277cd9
commit 2a4276aa3e

View File

@@ -319,12 +319,7 @@ func (t *TorrentManager) TriggerHookOnLibraryUpdate(updatedPaths []string) {
// proxy
func (t *TorrentManager) UnrestrictUntilOk(link string) *realdebrid.Download {
retChan := make(chan *realdebrid.Download, 1)
defer close(retChan)
t.workerPool.Submit(func() {
retChan <- t.Api.UnrestrictUntilOk(link, t.Config.ShouldServeFromRclone())
})
return <-retChan
return t.Api.UnrestrictUntilOk(link, t.Config.ShouldServeFromRclone())
}
func (t *TorrentManager) SetNewLatestState(checksum LibraryState) {