From b96930d1861ca5b786c27300ebd8a8c4a7e20267 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Wed, 28 Apr 2021 16:04:08 +0300 Subject: [PATCH] fix dn to title with magnet --- server/torr/apihelper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/torr/apihelper.go b/server/torr/apihelper.go index d37ead9..7cc8786 100644 --- a/server/torr/apihelper.go +++ b/server/torr/apihelper.go @@ -52,8 +52,8 @@ func AddTorrent(spec *torrent.TorrentSpec, title, poster string, data string) (* if title == "" && torDB != nil { torr.Title = torDB.Title } - if torr.Title == "" && torr.Torrent != nil { - torr.Title = torr.Name() + if torr.Title == "" && torr.Torrent != nil && torr.Torrent.Info() != nil { + torr.Title = torr.Info().Name } } if torr.Poster == "" {