feat(backend): add advanced torrent management apis (files, peers, trackers, priority, label)

This commit is contained in:
spinline
2026-02-03 22:39:02 +03:00
parent 8f16265107
commit 78f232a909
5 changed files with 483 additions and 129 deletions

View File

@@ -37,6 +37,7 @@ pub fn diff_torrents(old: &[Torrent], new: &[Torrent]) -> DiffResult {
eta: None,
status: None,
error_message: None,
label: None,
};
let mut has_changes = false;
@@ -78,6 +79,10 @@ pub fn diff_torrents(old: &[Torrent], new: &[Torrent]) -> DiffResult {
update.error_message = Some(new_t.error_message.clone());
has_changes = true;
}
if old_t.label != new_t.label {
update.label = new_t.label.clone();
has_changes = true;
}
if has_changes {
events.push(AppEvent::Update(update));