mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +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):
|
def start_torrents(self):
|
||||||
"""Start all torrents."""
|
"""Start all torrents."""
|
||||||
if len(self._torrents) <= 0:
|
if not self._torrents:
|
||||||
return
|
return
|
||||||
self._api.start_all()
|
self._api.start_all()
|
||||||
|
|
||||||
def stop_torrents(self):
|
def stop_torrents(self):
|
||||||
"""Stop all active torrents."""
|
"""Stop all active torrents."""
|
||||||
if len(self._torrents) == 0:
|
if not self._torrents:
|
||||||
return
|
return
|
||||||
torrent_ids = [torrent.id for torrent in self._torrents]
|
torrent_ids = [torrent.id for torrent in self._torrents]
|
||||||
self._api.stop_torrent(torrent_ids)
|
self._api.stop_torrent(torrent_ids)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user