From 7179c4a85f8b8bad2281832a39077e1e62b6e4ab Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Sun, 12 May 2024 19:02:04 +0300 Subject: [PATCH] don't override torrent timestamp on edit --- server/torr/dbwrapper.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/torr/dbwrapper.go b/server/torr/dbwrapper.go index 05c1919..be4938b 100644 --- a/server/torr/dbwrapper.go +++ b/server/torr/dbwrapper.go @@ -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) }