Skip to content

Commit 6abc0fb

Browse files
committed
fix sync v1
1 parent cbf0142 commit 6abc0fb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Controllers/SyncController.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,23 @@ public JsonResult Torrents(long time)
8484
{
8585
foreach (var torrent in FileDB.OpenRead(item.Key))
8686
{
87+
var _t = (TorrentDetails)torrent.Value.Clone();
88+
89+
var streams = TracksDB.Get(_t.magnet, _t.types);
90+
if (streams != null)
91+
{
92+
_t.ffprobe = streams;
93+
_t.languages = TracksDB.Languages(_t, streams);
94+
}
95+
8796
if (torrents.TryGetValue(torrent.Key, out TorrentDetails val))
8897
{
8998
if (torrent.Value.updateTime > val.updateTime)
90-
torrents[torrent.Key] = torrent.Value;
99+
torrents[torrent.Key] = _t;
91100
}
92101
else
93102
{
94-
torrents.TryAdd(torrent.Key, torrent.Value);
103+
torrents.TryAdd(torrent.Key, _t);
95104
}
96105
}
97106

0 commit comments

Comments
 (0)