Skip to content

Commit

Permalink
Add support for RCA PlayingMode
Browse files Browse the repository at this point in the history
  • Loading branch information
berezovskyi-oleksandr committed Aug 9, 2024
1 parent c37739f commit 3c0063f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/linkplay/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ def playmode_support(self) -> list[PlayingMode]:
flags = InputMode(
int(self.properties[DeviceAttribute.PLAYMODE_SUPPORT], base=16)
)
return [INPUT_MODE_MAP[flag] for flag in flags]

playing_modes = [INPUT_MODE_MAP[flag] for flag in flags]

if self.properties[DeviceAttribute.PROJECT] == "U-AIOTWIN-V1":
playing_modes.append(PlayingMode.RCA)

return playing_modes

@property
def eth(self) -> str:
Expand Down
2 changes: 2 additions & 0 deletions src/linkplay/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ class InputMode(IntFlag):
BLUETOOTH = 4
USB = 8
OPTICAL = 16
RCA = 32
COAXIAL = 64
LINE_IN_2 = 256
USB_DAC = 32768
Expand All @@ -179,6 +180,7 @@ class InputMode(IntFlag):
InputMode.BLUETOOTH: PlayingMode.BLUETOOTH,
InputMode.USB: PlayingMode.UDISK,
InputMode.OPTICAL: PlayingMode.OPTICAL,
InputMode.RCA: PlayingMode.RCA,
InputMode.COAXIAL: PlayingMode.COAXIAL,
InputMode.LINE_IN_2: PlayingMode.LINE_IN_2,
InputMode.USB_DAC: PlayingMode.USB_DAC,
Expand Down

0 comments on commit 3c0063f

Please sign in to comment.