mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Fix count bug in qBittorrent (#106603)
This commit is contained in:
parent
16192cd7f2
commit
06f06b7595
@ -165,6 +165,9 @@ def count_torrents_in_states(
|
|||||||
coordinator: QBittorrentDataCoordinator, states: list[str]
|
coordinator: QBittorrentDataCoordinator, states: list[str]
|
||||||
) -> int:
|
) -> int:
|
||||||
"""Count the number of torrents in specified states."""
|
"""Count the number of torrents in specified states."""
|
||||||
|
if not states:
|
||||||
|
return len(coordinator.data["torrents"])
|
||||||
|
|
||||||
return len(
|
return len(
|
||||||
[
|
[
|
||||||
torrent
|
torrent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user