remove unused name from db

This commit is contained in:
YouROK
2021-03-11 14:47:40 +03:00
parent 542946b65a
commit c03ea41cb4
3 changed files with 0 additions and 6 deletions

View File

@@ -90,7 +90,6 @@ func Migrate() {
log.TLogln("Migrate torrent", torr.Name, torr.Hash, torr.Size) log.TLogln("Migrate torrent", torr.Name, torr.Hash, torr.Size)
AddTorrent(&TorrentDB{ AddTorrent(&TorrentDB{
TorrentSpec: spec, TorrentSpec: spec,
Name: torr.Name,
Title: title, Title: title,
Timestamp: torr.Timestamp, Timestamp: torr.Timestamp,
Size: torr.Size, Size: torr.Size,

View File

@@ -12,7 +12,6 @@ import (
type TorrentDB struct { type TorrentDB struct {
*torrent.TorrentSpec *torrent.TorrentSpec
Name string `json:"name"`
Title string `json:"title,omitempty"` Title string `json:"title,omitempty"`
Poster string `json:"poster,omitempty"` Poster string `json:"poster,omitempty"`
Data string `json:"data,omitempty"` Data string `json:"data,omitempty"`

View File

@@ -12,12 +12,8 @@ import (
func AddTorrentDB(torr *Torrent) { func AddTorrentDB(torr *Torrent) {
t := new(settings.TorrentDB) t := new(settings.TorrentDB)
t.TorrentSpec = torr.TorrentSpec t.TorrentSpec = torr.TorrentSpec
t.Name = torr.Name()
t.Title = torr.Title t.Title = torr.Title
t.Data = torr.Data t.Data = torr.Data
if t.Title == "" {
t.Title = t.Name
}
t.Poster = torr.Poster t.Poster = torr.Poster
t.Size = torr.Size t.Size = torr.Size
if t.Size == 0 && torr.Torrent != nil { if t.Size == 0 && torr.Torrent != nil {