fix data override on torrent edit via web

This commit is contained in:
nikk gitanes
2024-04-12 11:27:08 +03:00
parent b4e6281c5c
commit 7a5d22b8bf
4 changed files with 26 additions and 11 deletions

View File

@@ -136,14 +136,18 @@ func SetTorrent(hashHex, title, poster, category string, data string) *Torrent {
torr.Title = title
torr.Poster = poster
torr.Category = category
torr.Data = data
if data != "" {
torr.Data = data
}
}
if torrDb != nil {
torrDb.Title = title
torrDb.Poster = poster
torrDb.Category = category
torrDb.Data = data
if data != "" {
torrDb.Data = data
}
AddTorrentDB(torrDb)
}
if torr != nil {