mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Clean up transmission empty containers evaluation (#59304)
This commit is contained in:
parent
8ebd47b430
commit
563eba7684
@ -441,13 +441,13 @@ class TransmissionData:
|
||||
|
||||
def start_torrents(self):
|
||||
"""Start all torrents."""
|
||||
if len(self._torrents) <= 0:
|
||||
if not self._torrents:
|
||||
return
|
||||
self._api.start_all()
|
||||
|
||||
def stop_torrents(self):
|
||||
"""Stop all active torrents."""
|
||||
if len(self._torrents) == 0:
|
||||
if not self._torrents:
|
||||
return
|
||||
torrent_ids = [torrent.id for torrent in self._torrents]
|
||||
self._api.stop_torrent(torrent_ids)
|
||||
|
Loading…
x
Reference in New Issue
Block a user