mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
remove unused name from db
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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"`
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user