mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
fix upload crash
This commit is contained in:
@@ -42,9 +42,18 @@ func torrentUpload(c *gin.Context) {
|
||||
log.TLogln("error upload torrent:", err)
|
||||
continue
|
||||
}
|
||||
if save {
|
||||
torr.SaveTorrentToDB(tor)
|
||||
}
|
||||
|
||||
go func() {
|
||||
if !tor.GotInfo() {
|
||||
log.TLogln("error add torrent:", "timeout connection torrent")
|
||||
return
|
||||
}
|
||||
|
||||
if save {
|
||||
torr.SaveTorrentToDB(tor)
|
||||
}
|
||||
}()
|
||||
|
||||
retList = append(retList, tor.Status())
|
||||
}
|
||||
c.JSON(200, retList)
|
||||
|
||||
Reference in New Issue
Block a user