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