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)
|
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 {
|
if err != nil {
|
||||||
log.TLogln("error add torrent:", err)
|
log.TLogln("error add torrent:", err)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ func torrentUpload(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
var tor *torr.Torrent
|
var tor *torr.Torrent
|
||||||
for name, file := range form.File {
|
for name, file := range form.File {
|
||||||
log.TLogln("add torrent file", name)
|
log.TLogln("add .torrent", name)
|
||||||
|
|
||||||
torrFile, err := file[0].Open()
|
torrFile, err := file[0].Open()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -72,6 +72,9 @@ func torrentUpload(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tor, err = torr.AddTorrent(spec, title, poster, data, category)
|
tor, err = torr.AddTorrent(spec, title, poster, data, category)
|
||||||
|
|
||||||
|
log.TLogln("Final torrent category:", tor.Category)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.TLogln("error upload torrent:", err)
|
log.TLogln("error upload torrent:", err)
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package template
|
|||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ export default function AddDialog({
|
|||||||
data.append('save', 'true')
|
data.append('save', 'true')
|
||||||
data.append('file', selectedFile)
|
data.append('file', selectedFile)
|
||||||
title && data.append('title', title)
|
title && data.append('title', title)
|
||||||
|
category && data.append('category', category)
|
||||||
posterUrl && data.append('poster', posterUrl)
|
posterUrl && data.append('poster', posterUrl)
|
||||||
axios.post(torrentUploadHost(), data).catch(handleClose)
|
axios.post(torrentUploadHost(), data).catch(handleClose)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user