mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
log torrent data in debug only
This commit is contained in:
@@ -97,10 +97,10 @@ 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)
|
||||||
|
|
||||||
if tor.Data != "" {
|
if tor.Data != "" && set.BTsets.EnableDebug {
|
||||||
log.TLogln("torrent data:", tor.Data)
|
log.TLogln("torrent data:", tor.Data)
|
||||||
}
|
}
|
||||||
if tor.Category != "" {
|
if tor.Category != "" && set.BTsets.EnableDebug {
|
||||||
log.TLogln("torrent category:", tor.Category)
|
log.TLogln("torrent category:", tor.Category)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"server/log"
|
"server/log"
|
||||||
|
set "server/settings"
|
||||||
"server/torr"
|
"server/torr"
|
||||||
"server/web/api/utils"
|
"server/web/api/utils"
|
||||||
|
|
||||||
@@ -73,10 +74,10 @@ func torrentUpload(c *gin.Context) {
|
|||||||
|
|
||||||
tor, err = torr.AddTorrent(spec, title, poster, data, category)
|
tor, err = torr.AddTorrent(spec, title, poster, data, category)
|
||||||
|
|
||||||
if tor.Data != "" {
|
if tor.Data != "" && set.BTsets.EnableDebug {
|
||||||
log.TLogln("torrent data:", tor.Data)
|
log.TLogln("torrent data:", tor.Data)
|
||||||
}
|
}
|
||||||
if tor.Category != "" {
|
if tor.Category != "" && set.BTsets.EnableDebug {
|
||||||
log.TLogln("torrent category:", tor.Category)
|
log.TLogln("torrent category:", tor.Category)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user