From 9744982f79bf442a4871b1db82a6aad18cae5fb8 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Thu, 11 Mar 2021 20:05:31 +0300 Subject: [PATCH] add torr name to empty title --- server/web/api/torrents.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/web/api/torrents.go b/server/web/api/torrents.go index 5e928b8..079eef2 100644 --- a/server/web/api/torrents.go +++ b/server/web/api/torrents.go @@ -89,6 +89,10 @@ func addTorrent(req torrReqJS, c *gin.Context) { return } + if tor.Title == "" { + tor.Title = tor.Name() + } + if req.SaveToDB { torr.SaveTorrentToDB(tor) }