fix(qbittorrent): preserve torrent metadata in incremental updates

This commit is contained in:
Developer
2026-07-21 12:26:43 +00:00
parent 1bf8a34a97
commit e8d3ab87a9
3 changed files with 26 additions and 6 deletions
@@ -220,7 +220,12 @@ class QbittorrentClient:
if fields is None:
snap["torrents"].pop(hash_, None)
else:
snap["torrents"][hash_] = fields
previous = snap["torrents"].get(hash_)
snap["torrents"][hash_] = (
{**previous, **fields}
if isinstance(previous, dict) and isinstance(fields, dict)
else fields
)
for hash_ in update.get("torrents_removed") or []:
snap["torrents"].pop(hash_, None)
categories = update.get("categories")