mirror of
https://github.com/google/bumble.git
synced 2026-04-18 00:45:32 +00:00
AVRCP: Address type errors
This commit is contained in:
@@ -1539,7 +1539,6 @@ class PlayerApplicationSettingChangedEvent(Event):
|
|||||||
| ApplicationSetting.ShuffleOnOffStatus
|
| ApplicationSetting.ShuffleOnOffStatus
|
||||||
| ApplicationSetting.ScanOnOffStatus
|
| ApplicationSetting.ScanOnOffStatus
|
||||||
| ApplicationSetting.GenericValue
|
| ApplicationSetting.GenericValue
|
||||||
| int
|
|
||||||
) = field(metadata=hci.metadata(1))
|
) = field(metadata=hci.metadata(1))
|
||||||
|
|
||||||
def __post_init__(self) -> None:
|
def __post_init__(self) -> None:
|
||||||
@@ -2835,7 +2834,7 @@ class Protocol(utils.EventEmitter):
|
|||||||
event = PlayerApplicationSettingChangedEvent(
|
event = PlayerApplicationSettingChangedEvent(
|
||||||
[
|
[
|
||||||
PlayerApplicationSettingChangedEvent.Setting(
|
PlayerApplicationSettingChangedEvent.Setting(
|
||||||
attribute, value
|
attribute, value # type: ignore
|
||||||
)
|
)
|
||||||
for attribute, value in settings.items()
|
for attribute, value in settings.items()
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -133,10 +133,10 @@ def on_avrcp_start(
|
|||||||
utils.AsyncRunner.spawn(get_supported_events())
|
utils.AsyncRunner.spawn(get_supported_events())
|
||||||
|
|
||||||
async def monitor_track_changed() -> None:
|
async def monitor_track_changed() -> None:
|
||||||
async for identifier in avrcp_protocol.monitor_track_changed():
|
async for uid in avrcp_protocol.monitor_track_changed():
|
||||||
print("TRACK CHANGED:", identifier.hex())
|
print("TRACK CHANGED:", hex(uid))
|
||||||
websocket_server.send_message(
|
websocket_server.send_message(
|
||||||
{"type": "track-changed", "params": {"identifier": identifier.hex()}}
|
{"type": "track-changed", "params": {"identifier": hex(uid)}}
|
||||||
)
|
)
|
||||||
|
|
||||||
async def monitor_playback_status() -> None:
|
async def monitor_playback_status() -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user