Skip to content

Commit 1a5eea1

Browse files
authored
build: update ucapi to 0.6.0, pylint to 4.0.5 (#143)
1 parent 238f93c commit 1a5eea1

5 files changed

Lines changed: 22 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## Unreleased
99
_Changes in the next release_
1010

11+
### Changed
12+
- Update ucapi to 0.6.0 ([#143](https://github.com/unfoldedcircle/integration-androidtv/pull/143)).
13+
1114
---
1215

1316
## v0.8.4 - 2026-04-27

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
androidtvremote2==0.3.1
2-
ucapi==0.5.2
2+
ucapi==0.6.0
33
pyee~=13.0.1
44
google_play_scraper==1.2.7
55
pillow>=12.2.0

src/setup_flow.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ class SetupSteps(IntEnum):
4242

4343

4444
_setup_step = SetupSteps.INIT
45-
_cfg_add_device: bool = False
45+
_cfg_add_device: bool = False # No idea why pylint is complaining this is a constant! pylint: disable=C0103
4646
_discovered_android_tvs: list[dict[str, str]] = []
47-
_pairing_android_tv: tv.AndroidTv | None = None
48-
_use_external_metadata: bool = False
49-
_reconfigured_device: AtvDevice | None = None
50-
_use_chromecast: bool = False
51-
_use_chromecast_volume: bool = False
52-
_volume_step: int = 10
53-
_use_voice: bool = False
47+
_pairing_android_tv: tv.AndroidTv | None = None # pylint: disable=C0103
48+
_use_external_metadata: bool = False # pylint: disable=C0103
49+
_reconfigured_device: AtvDevice | None = None # pylint: disable=C0103
50+
_use_chromecast: bool = False # pylint: disable=C0103
51+
_use_chromecast_volume: bool = False # pylint: disable=C0103
52+
_volume_step: int = 10 # pylint: disable=C0103
53+
_use_voice: bool = False # pylint: disable=C0103
5454

5555
# TODO #9 externalize language texts
5656
_user_input_discovery = RequestUserInput(

src/tv.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
from pyee.asyncio import AsyncIOEventEmitter
4646
from ucapi import media_player
4747
from ucapi.media_player import Attributes as MediaAttr
48-
from ucapi.media_player import MediaType
48+
from ucapi.media_player import MediaContentType
4949

5050
import apps
5151
import discover
@@ -105,10 +105,10 @@ class DeviceState(IntEnum):
105105

106106

107107
GOOGLE_CAST_MEDIA_TYPES_MAP = {
108-
METADATA_TYPE_GENERIC: MediaType.VIDEO,
109-
METADATA_TYPE_MOVIE: MediaType.MOVIE,
110-
METADATA_TYPE_MUSICTRACK: MediaType.MUSIC,
111-
METADATA_TYPE_TVSHOW: MediaType.TVSHOW,
108+
METADATA_TYPE_GENERIC: MediaContentType.VIDEO,
109+
METADATA_TYPE_MOVIE: MediaContentType.MOVIE,
110+
METADATA_TYPE_MUSICTRACK: MediaContentType.MUSIC,
111+
METADATA_TYPE_TVSHOW: MediaContentType.TV_SHOW,
112112
}
113113

114114
GOOGLE_CAST_MEDIA_STATES_MAP = {
@@ -232,7 +232,7 @@ def __init__(
232232
self._media_position = 0
233233
self._media_duration = 0
234234
self._last_update_position_time: float = 0
235-
self._media_type: MediaType | None = None
235+
self._media_type: MediaContentType | None = None
236236
self._media_image_url: str | None = None
237237
self._app_image_url: str = ""
238238
self._use_app_url = not device_config.use_chromecast
@@ -969,9 +969,9 @@ async def _handle_new_media_status(self, status: MediaStatus):
969969

970970
if (
971971
status.metadata_type
972-
and GOOGLE_CAST_MEDIA_TYPES_MAP.get(status.metadata_type, MediaType.VIDEO) != self._media_type
972+
and GOOGLE_CAST_MEDIA_TYPES_MAP.get(status.metadata_type, MediaContentType.VIDEO) != self._media_type
973973
):
974-
self._media_type = GOOGLE_CAST_MEDIA_TYPES_MAP.get(status.metadata_type, MediaType.VIDEO)
974+
self._media_type = GOOGLE_CAST_MEDIA_TYPES_MAP.get(status.metadata_type, MediaContentType.VIDEO)
975975
update[MediaAttr.MEDIA_TYPE] = self._media_type
976976

977977
if status.images and len(status.images) > 0:

test-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# pylint 4.0.4 is way stricter - a patch update!
2-
pylint==4.0.3
1+
# pin pylint version: it has a tendendy for stricter rules in patch updates!
2+
pylint==4.0.5
33
flake8-docstrings
44
flake8
55
black

0 commit comments

Comments
 (0)