mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
update
This commit is contained in:
@@ -3,13 +3,14 @@ package api
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/pkg/errors"
|
||||
"server/log"
|
||||
"server/torr"
|
||||
"server/torr/state"
|
||||
"server/web/api/utils"
|
||||
|
||||
"github.com/anacrolix/torrent/metainfo"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
//Action: add, get, rem, list, drop
|
||||
@@ -70,7 +71,7 @@ func addTorrent(req torrReqJS, c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if !torr.WaitInfo() {
|
||||
if !torr.GotInfo() {
|
||||
log.TLogln("error add torrent:", "timeout connection torrent")
|
||||
c.AbortWithError(http.StatusNotFound, errors.New("timeout connection torrent"))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user