mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
don't override torrent timestamp on edit
This commit is contained in:
@@ -2,7 +2,6 @@ package torr
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"server/settings"
|
||||
"server/torr/state"
|
||||
@@ -40,7 +39,9 @@ func AddTorrentDB(torr *Torrent) {
|
||||
if t.Size == 0 && torr.Torrent != nil {
|
||||
t.Size = torr.Torrent.Length()
|
||||
}
|
||||
t.Timestamp = time.Now().Unix()
|
||||
// don't override timestamp from DB on edit
|
||||
t.Timestamp = torr.Timestamp // time.Now().Unix()
|
||||
|
||||
settings.AddTorrent(t)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user