Skip to content

Commit

Permalink
Feature: Configure ex commands (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-simpson authored Aug 9, 2024
1 parent 578a2cc commit 266c414
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/linkplay/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,22 @@ def muted(self) -> bool:
@property
def title(self) -> str:
"""Returns if the currently playing title of the track."""
if not PlayerAttribute.TITLE in self.properties:
return ""
return self.properties[PlayerAttribute.TITLE]

@property
def artist(self) -> str:
"""Returns if the currently playing artist."""
if not PlayerAttribute.ARTIST in self.properties:
return ""
return self.properties[PlayerAttribute.ARTIST]

@property
def album(self) -> str:
"""Returns if the currently playing album."""
if not PlayerAttribute.ALBUM in self.properties:
return ""
return self.properties[PlayerAttribute.ALBUM]

@property
Expand Down
4 changes: 2 additions & 2 deletions src/linkplay/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
class LinkPlayCommand(StrEnum):
"""Defines the LinkPlay commands."""

DEVICE_STATUS = "getStatus"
DEVICE_STATUS = "getStatusEx"
SYSLOG = "getsyslog"
UPDATE_SERVER = "GetUpdateServer"
REBOOT = "reboot"
PLAYER_STATUS = "getPlayerStatus"
PLAYER_STATUS = "getPlayerStatusEx"
NEXT = "setPlayerCmd:next"
PREVIOUS = "setPlayerCmd:prev"
UNMUTE = "setPlayerCmd:mute:0"
Expand Down

0 comments on commit 266c414

Please sign in to comment.