Fix count bug in qBittorrent (#106603)

pull/106641/head
Joe Neuman 2023-12-29 02:08:40 -08:00 committed by GitHub
parent 27bdbc6600
commit e17e372c94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -165,6 +165,9 @@ def count_torrents_in_states(
coordinator: QBittorrentDataCoordinator, states: list[str]
) -> int:
"""Count the number of torrents in specified states."""
if not states:
return len(coordinator.data["torrents"])
return len(
[
torrent