mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-04 08:57:42 +08:00
refactor: thread safe tasks
This commit is contained in:
@@ -199,7 +199,7 @@ func (c *Engine) downloadTorrent(m *ent.Media, r1 torznab.Result, seasonNum int,
|
||||
}
|
||||
torrent.Start()
|
||||
|
||||
c.tasks[history.ID] = &Task{Torrent: torrent}
|
||||
c.tasks.Store(history.ID, &Task{Torrent: torrent})
|
||||
|
||||
c.sendMsg(fmt.Sprintf(message.BeginDownload, name))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user