Skip to content

Commit

Permalink
Fix URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
fwestenberg committed Dec 26, 2024
1 parent 5a98c4e commit ee59bf8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
31 changes: 18 additions & 13 deletions devialet/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,37 @@
MEDIA_RENDERER = "urn:schemas-upnp-org:device:MediaRenderer:2"

class UrlSuffix(Enum):
# Devices commands
GET_GENERAL_INFO = "/ipcontrol/v1/devices/current"
GET_SOURCES = "/ipcontrol/v1/groups/current/sources"
GET_CURRENT_SOURCE = "/ipcontrol/v1/groups/current/sources/current"

# Systems commands
GET_VOLUME = "/ipcontrol/v1/systems/current/sources/current/soundControl/volume"
GET_NIGHT_MODE = "/ipcontrol/v1/systems/current/settings/audio/nightMode"
GET_EQUALIZER = "/ipcontrol/v1/systems/current/settings/audio/equalizer"
GET_CURRENT_POSITION = (
"/ipcontrol/v1/groups/current/sources/current/playback/position"
)
SEEK = "/ipcontrol/v1/systems/current/sources/current/playback/position"
PLAY = "/ipcontrol/v1/systems/current/sources/current/playback/play"
PAUSE = "/ipcontrol/v1/systems/current/sources/current/playback/pause"
STOP = "/ipcontrol/v1/systems/current/sources/current/playback/pause"
PREVIOUS_TRACK = "/ipcontrol/v1/systems/current/sources/current/playback/previous"
NEXT_TRACK = "/ipcontrol/v1/systems/current/sources/current/playback/next"
TURN_OFF = "/ipcontrol/v1/systems/current/powerOff"
VOLUME_UP = "/ipcontrol/v1/systems/current/sources/current/soundControl/volumeUp"
VOLUME_DOWN = (
"/ipcontrol/v1/systems/current/sources/current/soundControl/volumeDown"
)
VOLUME_SET = "/ipcontrol/v1/systems/current/sources/current/soundControl/volume"
MUTE = "/ipcontrol/v1/groups/current/sources/current/playback/mute"
UNMUTE = "/ipcontrol/v1/groups/current/sources/current/playback/unmute"
EQUALIZER = "/ipcontrol/v1/systems/current/settings/audio/equalizer"
NIGHT_MODE = "/ipcontrol/v1/systems/current/settings/audio/nightMode"
SELECT_SOURCE = "/ipcontrol/v1/groups/current/sources/%SOURCE_ID%/playback/play"

# Groups commands
GET_SOURCES = "/ipcontrol/v1/groups/current/sources"
GET_CURRENT_SOURCE = "/ipcontrol/v1/groups/current/sources/current"
GET_CURRENT_POSITION = (
"/ipcontrol/v1/groups/current/sources/current/playback/position"
)
SEEK = "/ipcontrol/v1/groups/current/sources/current/playback/position"
PLAY = "/ipcontrol/v1/groups/current/sources/current/playback/play"
PAUSE = "/ipcontrol/v1/groups/current/sources/current/playback/pause"
STOP = "/ipcontrol/v1/groups/current/sources/current/playback/pause"
PREVIOUS_TRACK = "/ipcontrol/v1/groups/current/sources/current/playback/previous"
NEXT_TRACK = "/ipcontrol/v1/groups/current/sources/current/playback/next"
MUTE = "/ipcontrol/v1/groups/current/sources/current/playback/mute"
UNMUTE = "/ipcontrol/v1/groups/current/sources/current/playback/unmute"

def __str__(self):
return str(self.value)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name='devialet',
packages=['devialet'],
version='1.5.1',
version='1.5.2',
license='MIT',
description='Devialet API',
long_description_content_type="text/markdown",
Expand Down

0 comments on commit ee59bf8

Please sign in to comment.