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:
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -218,6 +218,7 @@ export default function AddDialog({
|
||||
data.append('save', 'true')
|
||||
data.append('file', selectedFile)
|
||||
title && data.append('title', title)
|
||||
category && data.append('category', category)
|
||||
posterUrl && data.append('poster', posterUrl)
|
||||
axios.post(torrentUploadHost(), data).catch(handleClose)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user