From 4165fc5b6ebcca617f6fff3a6aa439984af90b83 Mon Sep 17 00:00:00 2001 From: yourok <8yourok8@mail.ru> Date: Sat, 7 Mar 2020 21:14:48 +0300 Subject: [PATCH] fix file info --- src/server/settings/Torrent.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server/settings/Torrent.go b/src/server/settings/Torrent.go index dc9f4ae..e0ee6ac 100644 --- a/src/server/settings/Torrent.go +++ b/src/server/settings/Torrent.go @@ -272,7 +272,14 @@ func LoadTorrentsDB() ([]*Torrent, error) { if ffdb == nil { return fmt.Errorf("error load torrent files") } - tmp := ffdb.Get([]byte("Size")) + + tmp := ffdb.Get([]byte("Id")) + if tmp == nil { + return fmt.Errorf("error load torrent file") + } + file.Id = int(b2i(tmp)) + + tmp = ffdb.Get([]byte("Size")) if tmp == nil { return fmt.Errorf("error load torrent file") }