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