feat(backend): add advanced torrent management apis (files, peers, trackers, priority, label)
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user