mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
fix category on .torrent file add
This commit is contained in:
@@ -97,7 +97,7 @@ func addTorrent(req torrReqJS, c *gin.Context) {
|
||||
|
||||
tor, err := torr.AddTorrent(torrSpec, req.Title, req.Poster, req.Data, req.Category)
|
||||
|
||||
log.TLogln("Final torrent category: ", tor.Category)
|
||||
log.TLogln("Final torrent category:", tor.Category)
|
||||
|
||||
if err != nil {
|
||||
log.TLogln("error add torrent:", err)
|
||||
|
||||
@@ -56,7 +56,7 @@ func torrentUpload(c *gin.Context) {
|
||||
}
|
||||
var tor *torr.Torrent
|
||||
for name, file := range form.File {
|
||||
log.TLogln("add torrent file", name)
|
||||
log.TLogln("add .torrent", name)
|
||||
|
||||
torrFile, err := file[0].Open()
|
||||
if err != nil {
|
||||
@@ -72,6 +72,9 @@ func torrentUpload(c *gin.Context) {
|
||||
}
|
||||
|
||||
tor, err = torr.AddTorrent(spec, title, poster, data, category)
|
||||
|
||||
log.TLogln("Final torrent category:", tor.Category)
|
||||
|
||||
if err != nil {
|
||||
log.TLogln("error upload torrent:", err)
|
||||
continue
|
||||
|
||||
@@ -3,7 +3,6 @@ package template
|
||||
import (
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user