fix category on .torrent file add

This commit is contained in:
nikk gitanes
2024-04-10 17:15:21 +03:00
parent e842cf1105
commit 5922c7d320
4 changed files with 6 additions and 3 deletions

View File

@@ -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

View File

@@ -3,7 +3,6 @@ package template
import (
"crypto/md5"
"fmt"
"github.com/gin-gonic/gin"
)

View File

@@ -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 {