mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
update
This commit is contained in:
@@ -42,10 +42,6 @@ func AddTorrent(spec *torrent.TorrentSpec, title, poster string) (*Torrent, erro
|
||||
}
|
||||
}
|
||||
|
||||
if torr.Title == "" {
|
||||
torr.Title = torr.Name()
|
||||
}
|
||||
|
||||
return torr, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,14 @@ func AddTorrentDB(torr *Torrent) {
|
||||
t.TorrentSpec = torr.TorrentSpec
|
||||
t.Name = torr.Name()
|
||||
t.Title = torr.Title
|
||||
if t.Title == "" {
|
||||
t.Title = t.Name
|
||||
}
|
||||
t.Poster = torr.Poster
|
||||
t.Size = torr.Size
|
||||
if t.Size == 0 && torr.Torrent != nil {
|
||||
t.Size = torr.Torrent.Length()
|
||||
}
|
||||
t.Timestamp = time.Now().Unix()
|
||||
settings.AddTorrent(t)
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user