From ee59bf81b4fcbf2764eaaa4eab24771964256469 Mon Sep 17 00:00:00 2001 From: fwestenberg <47930023+fwestenberg@users.noreply.github.com> Date: Thu, 26 Dec 2024 01:42:18 +0100 Subject: [PATCH] Fix URLs --- devialet/const.py | 31 ++++++++++++++++++------------- setup.py | 2 +- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/devialet/const.py b/devialet/const.py index 71503f4..e57e646 100644 --- a/devialet/const.py +++ b/devialet/const.py @@ -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) diff --git a/setup.py b/setup.py index bf408b7..31609c6 100644 --- a/setup.py +++ b/setup.py @@ -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",