Bump transmission-rpc to version 7.0.3 (#103502)
* Bump transmission-rpc to version 7.0.3 * Change `date_added` to `added_date`
This commit is contained in:
parent
369cea175a
commit
b6a3f628d1
6 changed files with 8 additions and 8 deletions
|
@ -16,9 +16,9 @@ ORDER_WORST_RATIO_FIRST = "worst_ratio_first"
|
|||
|
||||
SUPPORTED_ORDER_MODES: dict[str, Callable[[list[Torrent]], list[Torrent]]] = {
|
||||
ORDER_NEWEST_FIRST: lambda torrents: sorted(
|
||||
torrents, key=lambda t: t.date_added, reverse=True
|
||||
torrents, key=lambda t: t.added_date, reverse=True
|
||||
),
|
||||
ORDER_OLDEST_FIRST: lambda torrents: sorted(torrents, key=lambda t: t.date_added),
|
||||
ORDER_OLDEST_FIRST: lambda torrents: sorted(torrents, key=lambda t: t.added_date),
|
||||
ORDER_WORST_RATIO_FIRST: lambda torrents: sorted(torrents, key=lambda t: t.ratio),
|
||||
ORDER_BEST_RATIO_FIRST: lambda torrents: sorted(
|
||||
torrents, key=lambda t: t.ratio, reverse=True
|
||||
|
|
|
@ -146,7 +146,7 @@ class TransmissionDataUpdateCoordinator(DataUpdateCoordinator[SessionStats]):
|
|||
"""Stop all active torrents."""
|
||||
if not self.torrents:
|
||||
return
|
||||
torrent_ids = [torrent.id for torrent in self.torrents]
|
||||
torrent_ids: list[int | str] = [torrent.id for torrent in self.torrents]
|
||||
self.api.stop_torrent(torrent_ids)
|
||||
|
||||
def set_alt_speed_enabled(self, is_enabled: bool) -> None:
|
||||
|
@ -158,4 +158,4 @@ class TransmissionDataUpdateCoordinator(DataUpdateCoordinator[SessionStats]):
|
|||
if self._session is None:
|
||||
return None
|
||||
|
||||
return self._session.alt_speed_enabled # type: ignore[no-any-return]
|
||||
return self._session.alt_speed_enabled
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/transmission",
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["transmissionrpc"],
|
||||
"requirements": ["transmission-rpc==4.1.5"]
|
||||
"requirements": ["transmission-rpc==7.0.3"]
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ def _torrents_info(
|
|||
torrents = SUPPORTED_ORDER_MODES[order](torrents)
|
||||
for torrent in torrents[:limit]:
|
||||
info = infos[torrent.name] = {
|
||||
"added_date": torrent.date_added,
|
||||
"added_date": torrent.added_date,
|
||||
"percent_done": f"{torrent.percent_done * 100:.2f}",
|
||||
"status": torrent.status,
|
||||
"id": torrent.id,
|
||||
|
|
|
@ -2614,7 +2614,7 @@ tp-connected==0.0.4
|
|||
tplink-omada-client==1.3.2
|
||||
|
||||
# homeassistant.components.transmission
|
||||
transmission-rpc==4.1.5
|
||||
transmission-rpc==7.0.3
|
||||
|
||||
# homeassistant.components.twinkly
|
||||
ttls==1.5.1
|
||||
|
|
|
@ -1935,7 +1935,7 @@ total-connect-client==2023.2
|
|||
tplink-omada-client==1.3.2
|
||||
|
||||
# homeassistant.components.transmission
|
||||
transmission-rpc==4.1.5
|
||||
transmission-rpc==7.0.3
|
||||
|
||||
# homeassistant.components.twinkly
|
||||
ttls==1.5.1
|
||||
|
|
Loading…
Add table
Reference in a new issue