Skip to content

Commit 6acef48

Browse files
committed
Removed selected should not count as active
1 parent 5cadf7d commit 6acef48

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

server/src/autograbber.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ pub async fn run_autograbber(
7777
.scan()
7878
.primary::<SelectedTorrent>()?
7979
.all()?
80-
.filter(|t| t.as_ref().is_ok_and(|t| t.grabber.as_ref() == Some(&name)))
80+
.filter(|t| {
81+
t.as_ref()
82+
.is_ok_and(|t| t.grabber.as_ref() == Some(&name) && t.removed_at.is_none())
83+
})
8184
.count() as u64;
8285
max_torrents = max_torrents.min(max_active_downloads.saturating_sub(downloading_torrents));
8386
}

0 commit comments

Comments
 (0)