From 9fef192b4a1490a99837a0be0536a22f98575460 Mon Sep 17 00:00:00 2001 From: Todd Lucas Date: Mon, 19 Aug 2024 21:29:30 -0500 Subject: [PATCH] [ 1.0.52 ] * Changed storage location of authorization Token Cache file to prevent data loss on version updates. The file was moved from `\config\custom_components\spotifyplus\data\tokens.json` to `\config\.storage\spotifyplus_tokens.json`, which will allow it to persist between version updates. Note that you can simply copy the Token Cache file from the old location to the new location prior to this update, so that you don't have to re-run the AuthTokenGenerator.py script again. * Added service `remove_audiobook_favorites` to remove one or more audiobooks (or the currently playing audiobook) from the current user's 'Your Library' favorites. * Added service `remove_episode_favorites` to remove one or more show episodes (or the currently playing episode) from the current user's 'Your Library' favorites. * Added service `remove_show_favorites` to remove one or more shows (or the currently playing show) from the current user's 'Your Library' favorites. * Added service `save_audiobook_favorites` to save one or more audiobooks (or the currently playing audiobook) to the current user's 'Your Library' favorites. * Added service `save_episode_favorites` to save one or more show episodes (or the currently playing episode) to the current user's 'Your Library' favorites. * Added service `save_show_favorites` to save one or more shows (or the currently playing show) to the current user's 'Your Library' favorites. * Updated underlying `spotifywebapiPython` package requirement to version 1.0.86. --- CHANGELOG.md | 13 +- custom_components/spotifyplus/__init__.py | 150 ++++++++- custom_components/spotifyplus/config_flow.py | 6 +- custom_components/spotifyplus/manifest.json | 4 +- custom_components/spotifyplus/media_player.py | 313 ++++++++++++++++-- custom_components/spotifyplus/services.yaml | 167 ++++++++-- custom_components/spotifyplus/strings.json | 180 ++++++++-- .../spotifyplus/translations/en.json | 182 ++++++++-- requirements.txt | 2 +- 9 files changed, 917 insertions(+), 100 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 667d424..4607559 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ Change are listed in reverse chronological order (newest to oldest). +###### [ 1.0.52 ] - 2024/08/19 + + * Changed storage location of authorization Token Cache file to prevent data loss on version updates. The file was moved from `\config\custom_components\spotifyplus\data\tokens.json` to `\config\.storage\spotifyplus_tokens.json`, which will allow it to persist between version updates. Note that you can simply copy the Token Cache file from the old location to the new location prior to this update, so that you don't have to re-run the AuthTokenGenerator.py script again. + * Added service `remove_audiobook_favorites` to remove one or more audiobooks (or the currently playing audiobook) from the current user's 'Your Library' favorites. + * Added service `remove_episode_favorites` to remove one or more show episodes (or the currently playing episode) from the current user's 'Your Library' favorites. + * Added service `remove_show_favorites` to remove one or more shows (or the currently playing show) from the current user's 'Your Library' favorites. + * Added service `save_audiobook_favorites` to save one or more audiobooks (or the currently playing audiobook) to the current user's 'Your Library' favorites. + * Added service `save_episode_favorites` to save one or more show episodes (or the currently playing episode) to the current user's 'Your Library' favorites. + * Added service `save_show_favorites` to save one or more shows (or the currently playing show) to the current user's 'Your Library' favorites. + * Updated underlying `spotifywebapiPython` package requirement to version 1.0.86. + ###### [ 1.0.51 ] - 2024/08/18 * Updated service `player_transfer_playback` to check Sonos transport status after transferring playback to the target device, and play / pause the transport as designated by the `play` argument. @@ -19,7 +30,7 @@ Change are listed in reverse chronological order (newest to oldest). ###### [ 1.0.49 ] - 2024/08/16 * Updated service `zeroconf_device_connect` to correctly process Spotify Connect requests for token type `authorization_code` devices. This requires you to setup a seperate OAuth2 authorization access token outside of Home Assistant in order to activate these devices. This (currently) only affects Sonos devices, as they are the only manufacturer (that I am aware of) that implements the `authorization_code` token type. More information can be found in the [wiki documentation](https://github.com/thlucas1/homeassistantcomponent_spotifyplus/wiki/Device-Configuration-Options#oauth2-token-for-tokentypeauthorization_code-devices). - * Added service `get_spotify_connect_device` to Get information about a specific Spotify Connect player device, and (optionally) activate the device if it requires it. + * Added service `get_spotify_connect_device` to get information about a specific Spotify Connect player device, and (optionally) activate the device if it requires it. * Updated service `player_resolve_device_id` with deprecated status, as the `get_spotify_connect_device` service offers the same (and more) functionality. * Updated service descriptions for services that specify a `limit` argument. * Added `sortResult` argument to the various services that return lists that can be sorted. If True (default), result items are sorted by name prior to returning to the caller; otherwise, results are left in the order that the Spotify Web API returned them. diff --git a/custom_components/spotifyplus/__init__.py b/custom_components/spotifyplus/__init__.py index acb7311..171db3b 100644 --- a/custom_components/spotifyplus/__init__.py +++ b/custom_components/spotifyplus/__init__.py @@ -129,8 +129,14 @@ SERVICE_SPOTIFY_PLAYLIST_ITEMS_CLEAR:str = 'playlist_items_clear' SERVICE_SPOTIFY_PLAYLIST_ITEMS_REMOVE:str = 'playlist_items_remove' SERVICE_SPOTIFY_REMOVE_ALBUM_FAVORITES:str = 'remove_album_favorites' +SERVICE_SPOTIFY_REMOVE_AUDIOBOOK_FAVORITES:str = 'remove_audiobook_favorites' +SERVICE_SPOTIFY_REMOVE_EPISODE_FAVORITES:str = 'remove_episode_favorites' +SERVICE_SPOTIFY_REMOVE_SHOW_FAVORITES:str = 'remove_show_favorites' SERVICE_SPOTIFY_REMOVE_TRACK_FAVORITES:str = 'remove_track_favorites' SERVICE_SPOTIFY_SAVE_ALBUM_FAVORITES:str = 'save_album_favorites' +SERVICE_SPOTIFY_SAVE_AUDIOBOOK_FAVORITES:str = 'save_audiobook_favorites' +SERVICE_SPOTIFY_SAVE_EPISODE_FAVORITES:str = 'save_episode_favorites' +SERVICE_SPOTIFY_SAVE_SHOW_FAVORITES:str = 'save_show_favorites' SERVICE_SPOTIFY_SAVE_TRACK_FAVORITES:str = 'save_track_favorites' SERVICE_SPOTIFY_SEARCH_ALBUMS:str = 'search_albums' SERVICE_SPOTIFY_SEARCH_ARTISTS:str = 'search_artists' @@ -558,6 +564,27 @@ } ) +SERVICE_SPOTIFY_REMOVE_AUDIOBOOK_FAVORITES_SCHEMA = vol.Schema( + { + vol.Required("entity_id"): cv.entity_id, + vol.Optional("ids"): cv.string, + } +) + +SERVICE_SPOTIFY_REMOVE_EPISODE_FAVORITES_SCHEMA = vol.Schema( + { + vol.Required("entity_id"): cv.entity_id, + vol.Optional("ids"): cv.string, + } +) + +SERVICE_SPOTIFY_REMOVE_SHOW_FAVORITES_SCHEMA = vol.Schema( + { + vol.Required("entity_id"): cv.entity_id, + vol.Optional("ids"): cv.string, + } +) + SERVICE_SPOTIFY_REMOVE_TRACK_FAVORITES_SCHEMA = vol.Schema( { vol.Required("entity_id"): cv.entity_id, @@ -572,6 +599,27 @@ } ) +SERVICE_SPOTIFY_SAVE_AUDIOBOOK_FAVORITES_SCHEMA = vol.Schema( + { + vol.Required("entity_id"): cv.entity_id, + vol.Optional("ids"): cv.string, + } +) + +SERVICE_SPOTIFY_SAVE_EPISODE_FAVORITES_SCHEMA = vol.Schema( + { + vol.Required("entity_id"): cv.entity_id, + vol.Optional("ids"): cv.string, + } +) + +SERVICE_SPOTIFY_SAVE_SHOW_FAVORITES_SCHEMA = vol.Schema( + { + vol.Required("entity_id"): cv.entity_id, + vol.Optional("ids"): cv.string, + } +) + SERVICE_SPOTIFY_SAVE_TRACK_FAVORITES_SCHEMA = vol.Schema( { vol.Required("entity_id"): cv.entity_id, @@ -966,6 +1014,27 @@ async def service_handle_spotify_command(service: ServiceCall) -> None: _logsi.LogVerbose(STAppMessages.MSG_SERVICE_EXECUTE % (service.service, entity.name)) await hass.async_add_executor_job(entity.service_spotify_remove_album_favorites, ids) + elif service.service == SERVICE_SPOTIFY_REMOVE_AUDIOBOOK_FAVORITES: + + # remove audiobook(s) from favorites. + ids = service.data.get("ids") + _logsi.LogVerbose(STAppMessages.MSG_SERVICE_EXECUTE % (service.service, entity.name)) + await hass.async_add_executor_job(entity.service_spotify_remove_audiobook_favorites, ids) + + elif service.service == SERVICE_SPOTIFY_REMOVE_EPISODE_FAVORITES: + + # remove episode(s) from favorites. + ids = service.data.get("ids") + _logsi.LogVerbose(STAppMessages.MSG_SERVICE_EXECUTE % (service.service, entity.name)) + await hass.async_add_executor_job(entity.service_spotify_remove_episode_favorites, ids) + + elif service.service == SERVICE_SPOTIFY_REMOVE_SHOW_FAVORITES: + + # remove show(s) from favorites. + ids = service.data.get("ids") + _logsi.LogVerbose(STAppMessages.MSG_SERVICE_EXECUTE % (service.service, entity.name)) + await hass.async_add_executor_job(entity.service_spotify_remove_show_favorites, ids) + elif service.service == SERVICE_SPOTIFY_REMOVE_TRACK_FAVORITES: # remove track(s) from favorites. @@ -980,6 +1049,27 @@ async def service_handle_spotify_command(service: ServiceCall) -> None: _logsi.LogVerbose(STAppMessages.MSG_SERVICE_EXECUTE % (service.service, entity.name)) await hass.async_add_executor_job(entity.service_spotify_save_album_favorites, ids) + elif service.service == SERVICE_SPOTIFY_SAVE_AUDIOBOOK_FAVORITES: + + # save audiobook(s) to favorites. + ids = service.data.get("ids") + _logsi.LogVerbose(STAppMessages.MSG_SERVICE_EXECUTE % (service.service, entity.name)) + await hass.async_add_executor_job(entity.service_spotify_save_audiobook_favorites, ids) + + elif service.service == SERVICE_SPOTIFY_SAVE_EPISODE_FAVORITES: + + # save episode(s) to favorites. + ids = service.data.get("ids") + _logsi.LogVerbose(STAppMessages.MSG_SERVICE_EXECUTE % (service.service, entity.name)) + await hass.async_add_executor_job(entity.service_spotify_save_episode_favorites, ids) + + elif service.service == SERVICE_SPOTIFY_SAVE_SHOW_FAVORITES: + + # save show(s) to favorites. + ids = service.data.get("ids") + _logsi.LogVerbose(STAppMessages.MSG_SERVICE_EXECUTE % (service.service, entity.name)) + await hass.async_add_executor_job(entity.service_spotify_save_show_favorites, ids) + elif service.service == SERVICE_SPOTIFY_SAVE_TRACK_FAVORITES: # save track(s) to favorites. @@ -1910,6 +2000,33 @@ def _GetEntityFromServiceData(hass:HomeAssistant, service:ServiceCall, field_id: supports_response=SupportsResponse.NONE, ) + _logsi.LogObject(SILevel.Verbose, STAppMessages.MSG_SERVICE_REQUEST_REGISTER % SERVICE_SPOTIFY_REMOVE_AUDIOBOOK_FAVORITES, SERVICE_SPOTIFY_REMOVE_AUDIOBOOK_FAVORITES_SCHEMA) + hass.services.async_register( + DOMAIN, + SERVICE_SPOTIFY_REMOVE_AUDIOBOOK_FAVORITES, + service_handle_spotify_command, + schema=SERVICE_SPOTIFY_REMOVE_AUDIOBOOK_FAVORITES_SCHEMA, + supports_response=SupportsResponse.NONE, + ) + + _logsi.LogObject(SILevel.Verbose, STAppMessages.MSG_SERVICE_REQUEST_REGISTER % SERVICE_SPOTIFY_REMOVE_EPISODE_FAVORITES, SERVICE_SPOTIFY_REMOVE_EPISODE_FAVORITES_SCHEMA) + hass.services.async_register( + DOMAIN, + SERVICE_SPOTIFY_REMOVE_EPISODE_FAVORITES, + service_handle_spotify_command, + schema=SERVICE_SPOTIFY_REMOVE_EPISODE_FAVORITES_SCHEMA, + supports_response=SupportsResponse.NONE, + ) + + _logsi.LogObject(SILevel.Verbose, STAppMessages.MSG_SERVICE_REQUEST_REGISTER % SERVICE_SPOTIFY_REMOVE_SHOW_FAVORITES, SERVICE_SPOTIFY_REMOVE_SHOW_FAVORITES_SCHEMA) + hass.services.async_register( + DOMAIN, + SERVICE_SPOTIFY_REMOVE_SHOW_FAVORITES, + service_handle_spotify_command, + schema=SERVICE_SPOTIFY_REMOVE_SHOW_FAVORITES_SCHEMA, + supports_response=SupportsResponse.NONE, + ) + _logsi.LogObject(SILevel.Verbose, STAppMessages.MSG_SERVICE_REQUEST_REGISTER % SERVICE_SPOTIFY_REMOVE_TRACK_FAVORITES, SERVICE_SPOTIFY_REMOVE_TRACK_FAVORITES_SCHEMA) hass.services.async_register( DOMAIN, @@ -1928,6 +2045,33 @@ def _GetEntityFromServiceData(hass:HomeAssistant, service:ServiceCall, field_id: supports_response=SupportsResponse.NONE, ) + _logsi.LogObject(SILevel.Verbose, STAppMessages.MSG_SERVICE_REQUEST_REGISTER % SERVICE_SPOTIFY_SAVE_AUDIOBOOK_FAVORITES, SERVICE_SPOTIFY_SAVE_AUDIOBOOK_FAVORITES_SCHEMA) + hass.services.async_register( + DOMAIN, + SERVICE_SPOTIFY_SAVE_AUDIOBOOK_FAVORITES, + service_handle_spotify_command, + schema=SERVICE_SPOTIFY_SAVE_AUDIOBOOK_FAVORITES_SCHEMA, + supports_response=SupportsResponse.NONE, + ) + + _logsi.LogObject(SILevel.Verbose, STAppMessages.MSG_SERVICE_REQUEST_REGISTER % SERVICE_SPOTIFY_SAVE_EPISODE_FAVORITES, SERVICE_SPOTIFY_SAVE_EPISODE_FAVORITES_SCHEMA) + hass.services.async_register( + DOMAIN, + SERVICE_SPOTIFY_SAVE_EPISODE_FAVORITES, + service_handle_spotify_command, + schema=SERVICE_SPOTIFY_SAVE_EPISODE_FAVORITES_SCHEMA, + supports_response=SupportsResponse.NONE, + ) + + _logsi.LogObject(SILevel.Verbose, STAppMessages.MSG_SERVICE_REQUEST_REGISTER % SERVICE_SPOTIFY_SAVE_SHOW_FAVORITES, SERVICE_SPOTIFY_SAVE_SHOW_FAVORITES_SCHEMA) + hass.services.async_register( + DOMAIN, + SERVICE_SPOTIFY_SAVE_SHOW_FAVORITES, + service_handle_spotify_command, + schema=SERVICE_SPOTIFY_SAVE_SHOW_FAVORITES_SCHEMA, + supports_response=SupportsResponse.NONE, + ) + _logsi.LogObject(SILevel.Verbose, STAppMessages.MSG_SERVICE_REQUEST_REGISTER % SERVICE_SPOTIFY_SAVE_TRACK_FAVORITES, SERVICE_SPOTIFY_SAVE_TRACK_FAVORITES_SCHEMA) hass.services.async_register( DOMAIN, @@ -2255,17 +2399,19 @@ def _TokenUpdater() -> dict: # create new spotify web api python client instance - "SpotifyClient()". _logsi.LogVerbose("'%s': Component async_setup_entry is creating SpotifyClient instance" % entry.title) - tokenStorageDir:str = "%s/custom_components/%s/data" % (hass.config.config_dir, DOMAIN) + tokenStorageDir:str = "%s/.storage" % (hass.config.config_dir) + tokenStorageFile:str = "%s_tokens.json" % (DOMAIN) spotifyClient:SpotifyClient = await hass.async_add_executor_job( SpotifyClient, None, # manager:PoolManager=None, tokenStorageDir, # tokenStorageDir:str=None, + tokenStorageFile, # tokenStorageFile:str=None, _TokenUpdater, # tokenUpdater:Callable=None, zeroconf_instance, # zeroconfClient:Zeroconf=None, entry.options.get(CONF_OPTION_DEVICE_USERNAME, None), entry.options.get(CONF_OPTION_DEVICE_PASSWORD, None), entry.options.get(CONF_OPTION_DEVICE_LOGINID, None), - ) + ) _logsi.LogObject(SILevel.Verbose, "'%s': Component async_setup_entry spotifyClient object" % entry.title, spotifyClient) # set spotify web api python token authorization from HA-managed OAuth2 session token. diff --git a/custom_components/spotifyplus/config_flow.py b/custom_components/spotifyplus/config_flow.py index 6fb6fea..237afdd 100644 --- a/custom_components/spotifyplus/config_flow.py +++ b/custom_components/spotifyplus/config_flow.py @@ -117,11 +117,13 @@ async def async_oauth_create_entry(self, data:dict[str,Any]) -> FlowResult: # create new spotify web api python client instance - "SpotifyClient()". _logsi.LogVerbose("Creating SpotifyClient instance") - tokenStorageDir:str = "%s/custom_components/%s/data" % (self.hass.config.config_dir, DOMAIN) + tokenStorageDir:str = "%s/.storage" % (self.hass.config.config_dir, DOMAIN) + tokenStorageFile:str = "%s_tokens.json" % (DOMAIN) spotifyClient:SpotifyClient = await self.hass.async_add_executor_job( SpotifyClient, None, # manager:PoolManager=None, tokenStorageDir, # tokenStorageDir:str=None, + tokenStorageFile, # tokenStorageFile:str=None, None, # tokenUpdater:Callable=None, zeroconf_instance # zeroconfClient:Zeroconf=None, ) @@ -403,7 +405,7 @@ async def async_step_init(self, user_input:dict[str,Any]=None) -> FlowResult: device_default:str = self._Options.get(CONF_OPTION_DEVICE_DEFAULT, None) _logsi.LogVerbose("'%s': OptionsFlow option '%s' - SELECTED value: '%s'" % (self._name, CONF_OPTION_DEVICE_DEFAULT, device_default)) device_loginid:str = self._Options.get(CONF_OPTION_DEVICE_LOGINID, None) - _logsi.LogVerbose("'%s': OptionsFlow option '%s' - SELECTED value: '%s'" % (self._name, CONF_OPTION_DEVICE_USERNAME, device_loginid)) + _logsi.LogVerbose("'%s': OptionsFlow option '%s' - SELECTED value: '%s'" % (self._name, CONF_OPTION_DEVICE_LOGINID, device_loginid)) device_username:str = self._Options.get(CONF_OPTION_DEVICE_USERNAME, None) _logsi.LogVerbose("'%s': OptionsFlow option '%s' - SELECTED value: '%s'" % (self._name, CONF_OPTION_DEVICE_USERNAME, device_username)) diff --git a/custom_components/spotifyplus/manifest.json b/custom_components/spotifyplus/manifest.json index 8f0108b..69dce78 100644 --- a/custom_components/spotifyplus/manifest.json +++ b/custom_components/spotifyplus/manifest.json @@ -17,10 +17,10 @@ "requests>=2.31.0", "requests_oauthlib>=1.3.1", "smartinspectPython>=3.0.33", - "spotifywebapiPython>=1.0.84", + "spotifywebapiPython>=1.0.86", "urllib3>=1.21.1,<1.27", "zeroconf>=0.132.2" ], - "version": "1.0.51", + "version": "1.0.52", "zeroconf": [ "_spotify-connect._tcp.local." ] } diff --git a/custom_components/spotifyplus/media_player.py b/custom_components/spotifyplus/media_player.py index 6906e01..65f9de2 100644 --- a/custom_components/spotifyplus/media_player.py +++ b/custom_components/spotifyplus/media_player.py @@ -5012,9 +5012,10 @@ def service_spotify_playlist_items_remove(self, _logsi.LeaveMethod(SILevel.Debug, apiMethodName) - def service_spotify_remove_album_favorites(self, - ids:str=None, - ) -> None: + def service_spotify_remove_album_favorites( + self, + ids:str=None, + ) -> None: """ Remove one or more albums from the current user's 'Your Library'. @@ -5052,9 +5053,133 @@ def service_spotify_remove_album_favorites(self, _logsi.LeaveMethod(SILevel.Debug, apiMethodName) - def service_spotify_remove_track_favorites(self, - ids:str=None, - ) -> None: + def service_spotify_remove_audiobook_favorites( + self, + ids:str=None, + ) -> None: + """ + Remove one or more audiobooks from the current user's 'Your Library'. + + Args: + ids (str): + A comma-separated list of the Spotify IDs for the audiobooks. + Maximum: 50 IDs. + Example: `3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe` + If null, the currently playing audiobook uri id value is used. + """ + apiMethodName:str = 'service_spotify_remove_audiobook_favorites' + apiMethodParms:SIMethodParmListContext = None + + try: + + # trace. + apiMethodParms = _logsi.EnterMethodParmList(SILevel.Debug, apiMethodName) + apiMethodParms.AppendKeyValue("ids", ids) + _logsi.LogMethodParmList(SILevel.Verbose, "Spotify Remove Audiobook Favorites Service", apiMethodParms) + + # remove items from Spotify audiobook favorites. + _logsi.LogVerbose("Removing items(s) from Spotify Audiobook Favorites") + self.data.spotifyClient.RemoveAudiobookFavorites(ids) + + # the following exceptions have already been logged, so we just need to + # pass them back to HA for display in the log (or service UI). + except SpotifyApiError as ex: + raise HomeAssistantError(ex.Message) + except SpotifyWebApiError as ex: + raise HomeAssistantError(ex.Message) + + finally: + + # trace. + _logsi.LeaveMethod(SILevel.Debug, apiMethodName) + + + def service_spotify_remove_episode_favorites( + self, + ids:str=None, + ) -> None: + """ + Remove one or more episodes from the current user's 'Your Library'. + + Args: + ids (str): + A comma-separated list of the Spotify IDs for the episodes. + Maximum: 50 IDs. + Example: `3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4` + If null, the currently playing episode uri id value is used. + """ + apiMethodName:str = 'service_spotify_remove_episode_favorites' + apiMethodParms:SIMethodParmListContext = None + + try: + + # trace. + apiMethodParms = _logsi.EnterMethodParmList(SILevel.Debug, apiMethodName) + apiMethodParms.AppendKeyValue("ids", ids) + _logsi.LogMethodParmList(SILevel.Verbose, "Spotify Remove Episode Favorites Service", apiMethodParms) + + # remove items from Spotify episode favorites. + _logsi.LogVerbose("Removing items(s) from Spotify Episode Favorites") + self.data.spotifyClient.RemoveEpisodeFavorites(ids) + + # the following exceptions have already been logged, so we just need to + # pass them back to HA for display in the log (or service UI). + except SpotifyApiError as ex: + raise HomeAssistantError(ex.Message) + except SpotifyWebApiError as ex: + raise HomeAssistantError(ex.Message) + + finally: + + # trace. + _logsi.LeaveMethod(SILevel.Debug, apiMethodName) + + + def service_spotify_remove_show_favorites( + self, + ids:str=None, + ) -> None: + """ + Remove one or more shows from the current user's 'Your Library'. + + Args: + ids (str): + A comma-separated list of the Spotify IDs for the shows. + Maximum: 50 IDs. + Example: `6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk` + If null, the currently playing show uri id value is used. + """ + apiMethodName:str = 'service_spotify_remove_show_favorites' + apiMethodParms:SIMethodParmListContext = None + + try: + + # trace. + apiMethodParms = _logsi.EnterMethodParmList(SILevel.Debug, apiMethodName) + apiMethodParms.AppendKeyValue("ids", ids) + _logsi.LogMethodParmList(SILevel.Verbose, "Spotify Remove Show Favorites Service", apiMethodParms) + + # remove items from Spotify show favorites. + _logsi.LogVerbose("Removing items(s) from Spotify Show Favorites") + self.data.spotifyClient.RemoveShowFavorites(ids) + + # the following exceptions have already been logged, so we just need to + # pass them back to HA for display in the log (or service UI). + except SpotifyApiError as ex: + raise HomeAssistantError(ex.Message) + except SpotifyWebApiError as ex: + raise HomeAssistantError(ex.Message) + + finally: + + # trace. + _logsi.LeaveMethod(SILevel.Debug, apiMethodName) + + + def service_spotify_remove_track_favorites( + self, + ids:str=None, + ) -> None: """ Remove one or more tracks from the current user's 'Your Library'. @@ -5092,9 +5217,10 @@ def service_spotify_remove_track_favorites(self, _logsi.LeaveMethod(SILevel.Debug, apiMethodName) - def service_spotify_save_album_favorites(self, - ids:str=None, - ) -> None: + def service_spotify_save_album_favorites( + self, + ids:str=None, + ) -> None: """ Save one or more albums to the current user's 'Your Library'. @@ -5132,9 +5258,133 @@ def service_spotify_save_album_favorites(self, _logsi.LeaveMethod(SILevel.Debug, apiMethodName) - def service_spotify_save_track_favorites(self, - ids:str=None, - ) -> None: + def service_spotify_save_audiobook_favorites( + self, + ids:str=None, + ) -> None: + """ + Save one or more audiobook to the current user's 'Your Library'. + + Args: + ids (str): + A comma-separated list of the Spotify IDs for the audiobooks. + Maximum: 50 IDs. + Example: `3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe` + If null, the currently playing audiobook uri id value is used. + """ + apiMethodName:str = 'service_spotify_save_audiobook_favorites' + apiMethodParms:SIMethodParmListContext = None + + try: + + # trace. + apiMethodParms = _logsi.EnterMethodParmList(SILevel.Debug, apiMethodName) + apiMethodParms.AppendKeyValue("ids", ids) + _logsi.LogMethodParmList(SILevel.Verbose, "Spotify Save Audiobook Favorites Service", apiMethodParms) + + # save items to Spotify audiobook favorites. + _logsi.LogVerbose("Saving items(s) to Spotify Audiobook Favorites") + self.data.spotifyClient.SaveAudiobookFavorites(ids) + + # the following exceptions have already been logged, so we just need to + # pass them back to HA for display in the log (or service UI). + except SpotifyApiError as ex: + raise HomeAssistantError(ex.Message) + except SpotifyWebApiError as ex: + raise HomeAssistantError(ex.Message) + + finally: + + # trace. + _logsi.LeaveMethod(SILevel.Debug, apiMethodName) + + + def service_spotify_save_episode_favorites( + self, + ids:str=None, + ) -> None: + """ + Save one or more episodes to the current user's 'Your Library'. + + Args: + ids (str): + A comma-separated list of the Spotify IDs for the episode. + Maximum: 50 IDs. + Example: `3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4` + If null, the currently playing episode uri id value is used. + """ + apiMethodName:str = 'service_spotify_save_episode_favorites' + apiMethodParms:SIMethodParmListContext = None + + try: + + # trace. + apiMethodParms = _logsi.EnterMethodParmList(SILevel.Debug, apiMethodName) + apiMethodParms.AppendKeyValue("ids", ids) + _logsi.LogMethodParmList(SILevel.Verbose, "Spotify Save Episode Favorites Service", apiMethodParms) + + # save items to Spotify episode favorites. + _logsi.LogVerbose("Saving items(s) to Spotify Episode Favorites") + self.data.spotifyClient.SaveEpisodeFavorites(ids) + + # the following exceptions have already been logged, so we just need to + # pass them back to HA for display in the log (or service UI). + except SpotifyApiError as ex: + raise HomeAssistantError(ex.Message) + except SpotifyWebApiError as ex: + raise HomeAssistantError(ex.Message) + + finally: + + # trace. + _logsi.LeaveMethod(SILevel.Debug, apiMethodName) + + + def service_spotify_save_show_favorites( + self, + ids:str=None, + ) -> None: + """ + Save one or more show to the current user's 'Your Library'. + + Args: + ids (str): + A comma-separated list of the Spotify IDs for the shows. + Maximum: 50 IDs. + Example: `6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk` + If null, the currently playing show uri id value is used. + """ + apiMethodName:str = 'service_spotify_save_show_favorites' + apiMethodParms:SIMethodParmListContext = None + + try: + + # trace. + apiMethodParms = _logsi.EnterMethodParmList(SILevel.Debug, apiMethodName) + apiMethodParms.AppendKeyValue("ids", ids) + _logsi.LogMethodParmList(SILevel.Verbose, "Spotify Save Show Favorites Service", apiMethodParms) + + # save items to Spotify show favorites. + _logsi.LogVerbose("Saving items(s) to Spotify Show Favorites") + self.data.spotifyClient.SaveShowFavorites(ids) + + # the following exceptions have already been logged, so we just need to + # pass them back to HA for display in the log (or service UI). + except SpotifyApiError as ex: + raise HomeAssistantError(ex.Message) + except SpotifyWebApiError as ex: + raise HomeAssistantError(ex.Message) + + finally: + + # trace. + _logsi.LeaveMethod(SILevel.Debug, apiMethodName) + + + def service_spotify_save_track_favorites( + self, + ids:str=None, + ) -> None: """ Save one or more tracks to the current user's 'Your Library'. @@ -6051,12 +6301,13 @@ def service_spotify_zeroconf_device_connect( # create Spotify Zeroconf API connection object for the device. zconn:ZeroconfConnect = ZeroconfConnect( - hostIpv4Address, - hostIpPort, - cpath, - version, - useSSL, - self.data.spotifyClient.TokenStorageDir, + hostIpAddress=hostIpv4Address, + hostIpPort=hostIpPort, + cpath=cpath, + version=version, + useSSL=useSSL, + tokenStorageDir=self.data.spotifyClient.TokenStorageDir, + tokenStorageFile=self.data.spotifyClient.TokenStorageFile, tokenAuthInBrowser=False) # are we verifying if the device id is already in the Spotify Connect device list? @@ -6168,12 +6419,13 @@ def service_spotify_zeroconf_device_disconnect( # create Spotify Zeroconf API connection object for the device. zconn:ZeroconfConnect = ZeroconfConnect( - hostIpv4Address, - hostIpPort, - cpath, - version, - useSSL, - self.data.spotifyClient.TokenStorageDir, + hostIpAddress=hostIpv4Address, + hostIpPort=hostIpPort, + cpath=cpath, + version=version, + useSSL=useSSL, + tokenStorageDir=self.data.spotifyClient.TokenStorageDir, + tokenStorageFile=self.data.spotifyClient.TokenStorageFile, tokenAuthInBrowser=False) # disconnect the device from Spotify Connect. @@ -6251,12 +6503,13 @@ def service_spotify_zeroconf_device_getinfo( # create Spotify Zeroconf API connection object for the device. zconn:ZeroconfConnect = ZeroconfConnect( - hostIpv4Address, - hostIpPort, - cpath, - version, - useSSL, - self.data.spotifyClient.TokenStorageDir, + hostIpAddress=hostIpv4Address, + hostIpPort=hostIpPort, + cpath=cpath, + version=version, + useSSL=useSSL, + tokenStorageDir=self.data.spotifyClient.TokenStorageDir, + tokenStorageFile=self.data.spotifyClient.TokenStorageFile, tokenAuthInBrowser=False) # get Spotify Connect device information. diff --git a/custom_components/spotifyplus/services.yaml b/custom_components/spotifyplus/services.yaml index 4e17aff..a82b244 100644 --- a/custom_components/spotifyplus/services.yaml +++ b/custom_components/spotifyplus/services.yaml @@ -111,7 +111,7 @@ get_album_favorites: domain: media_player limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -167,7 +167,7 @@ get_album_new_releases: domain: media_player limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -258,7 +258,7 @@ get_artist_albums: text: limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -321,7 +321,7 @@ get_artists_followed: text: limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -402,7 +402,7 @@ get_category_playlists: text: limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -458,7 +458,7 @@ get_featured_playlists: domain: media_player limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -626,7 +626,7 @@ get_player_recent_tracks: domain: media_player limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -720,7 +720,7 @@ get_playlist_favorites: domain: media_player limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -804,7 +804,7 @@ get_show_episodes: text: limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -853,7 +853,7 @@ get_show_favorites: domain: media_player limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -992,7 +992,7 @@ get_track_favorites: domain: media_player limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -1055,7 +1055,7 @@ get_users_top_artists: text: limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -1111,7 +1111,7 @@ get_users_top_tracks: text: limit: name: Limit - description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -1802,6 +1802,69 @@ remove_album_favorites: selector: text: +remove_audiobook_favorites: + name: Remove Audiobook Favorites + description: Remove one or more audiobooks from the current user's 'Your Library'. + fields: + entity_id: + name: Entity ID + description: Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API. + example: "media_player.spotifyplus_username" + required: true + selector: + entity: + integration: spotifyplus + domain: media_player + ids: + name: ID's + description: A comma-separated list of Spotify audiobook id's (e.g. `3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe`). A maximum of 50 id's may be specified. If omitted, the currently playing audiobook uri id value is used. + example: "3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe" + required: false + selector: + text: + +remove_episode_favorites: + name: Remove Episode Favorites + description: Remove one or more episodes from the current user's 'Your Library'. + fields: + entity_id: + name: Entity ID + description: Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API. + example: "media_player.spotifyplus_username" + required: true + selector: + entity: + integration: spotifyplus + domain: media_player + ids: + name: ID's + description: A comma-separated list of Spotify episode id's (e.g. `3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4`). A maximum of 50 id's may be specified. If omitted, the currently playing episode uri id value is used. + example: "3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4" + required: false + selector: + text: + +remove_show_favorites: + name: Remove Show Favorites + description: Remove one or more shows from the current user's 'Your Library'. + fields: + entity_id: + name: Entity ID + description: Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API. + example: "media_player.spotifyplus_username" + required: true + selector: + entity: + integration: spotifyplus + domain: media_player + ids: + name: ID's + description: A comma-separated list of Spotify show id's (e.g. `6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk`). A maximum of 50 id's may be specified. If omitted, the currently playing show uri id value is used. + example: "6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk" + required: false + selector: + text: + remove_track_favorites: name: Remove Track Favorites description: Remove one or more tracks from the current user's 'Your Library'. @@ -1844,6 +1907,69 @@ save_album_favorites: selector: text: +save_audiobook_favorites: + name: Save Audiobook Favorites + description: Save one or more audiobooks to the current user's 'Your Library'. + fields: + entity_id: + name: Entity ID + description: Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API. + example: "media_player.spotifyplus_username" + required: true + selector: + entity: + integration: spotifyplus + domain: media_player + ids: + name: ID's + description: A comma-separated list of Spotify audiobook id's (e.g. `3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe`). A maximum of 50 id's may be specified. If omitted, the currently playing audiobook uri id value is used. + example: "3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe" + required: false + selector: + text: + +save_episode_favorites: + name: Save Episode Favorites + description: Save one or more episodes to the current user's 'Your Library'. + fields: + entity_id: + name: Entity ID + description: Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API. + example: "media_player.spotifyplus_username" + required: true + selector: + entity: + integration: spotifyplus + domain: media_player + ids: + name: ID's + description: A comma-separated list of Spotify episode id's (e.g. `3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4`). A maximum of 50 id's may be specified. If omitted, the currently playing episode uri id value is used. + example: "3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4" + required: false + selector: + text: + +save_show_favorites: + name: Save Show Favorites + description: Save one or more shows to the current user's 'Your Library'. + fields: + entity_id: + name: Entity ID + description: Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API. + example: "media_player.spotifyplus_username" + required: true + selector: + entity: + integration: spotifyplus + domain: media_player + ids: + name: ID's + description: A comma-separated list of Spotify show id's (e.g. `6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk`). A maximum of 50 id's may be specified. If omitted, the currently playing show uri id value is used. + example: "6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk" + required: false + selector: + text: + save_track_favorites: name: Save Track Favorites description: Save one or more tracks to the current user's 'Your Library'. @@ -1887,7 +2013,7 @@ search_albums: text: limit: name: Limit - description: The maximum number of items to return. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -1905,7 +2031,6 @@ search_albums: min: 1 max: 500 mode: box - market: name: Market / Country Code description: An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter. @@ -1951,7 +2076,7 @@ search_artists: text: limit: name: Limit - description: The maximum number of items to return. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -2014,7 +2139,7 @@ search_audiobooks: text: limit: name: Limit - description: The maximum number of items to return. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -2077,7 +2202,7 @@ search_episodes: text: limit: name: Limit - description: The maximum number of items to return. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -2140,7 +2265,7 @@ search_playlists: text: limit: name: Limit - description: The maximum number of items to return. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -2203,7 +2328,7 @@ search_shows: text: limit: name: Limit - description: The maximum number of items to return. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: @@ -2266,7 +2391,7 @@ search_tracks: text: limit: name: Limit - description: The maximum number of items to return. + description: The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option. example: 20 required: false selector: diff --git a/custom_components/spotifyplus/strings.json b/custom_components/spotifyplus/strings.json index 14f2f92..ff76b43 100644 --- a/custom_components/spotifyplus/strings.json +++ b/custom_components/spotifyplus/strings.json @@ -133,7 +133,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -163,7 +163,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -215,7 +215,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -249,7 +249,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "limit_total": { "name": "Limit Total", @@ -297,7 +297,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -327,7 +327,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -429,7 +429,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "after": { "name": "After Time MS", @@ -481,7 +481,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -529,7 +529,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -555,7 +555,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -633,7 +633,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -667,7 +667,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -697,7 +697,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -1093,6 +1093,48 @@ } } }, + "remove_audiobook_favorites": { + "name": "Remove Audiobook Favorites", + "description": "Remove one or more audiobooks from the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify audiobook id's (e.g. `3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe`). A maximum of 50 id's may be specified. If omitted, the currently playing audiobook uri id value is used." + } + } + }, + "remove_episode_favorites": { + "name": "Remove Episode Favorites", + "description": "Remove one or more episodes from the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify episode id's (e.g. `3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4`). A maximum of 50 id's may be specified. If omitted, the currently playing episode uri id value is used." + } + } + }, + "remove_show_favorites": { + "name": "Remove Show Favorites", + "description": "Remove one or more albums from the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify show id's (e.g. `6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk`). A maximum of 50 id's may be specified. If omitted, the currently playing show uri id value is used." + } + } + }, "remove_track_favorites": { "name": "Remove Track Favorites", "description": "Remove one or more tracks from the current user's 'Your Library'.", @@ -1121,6 +1163,48 @@ } } }, + "save_audiobook_favorites": { + "name": "Save Audiobook Favorites", + "description": "Save one or more audiobook to the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify audiobook id's (e.g. `3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe`). A maximum of 50 id's may be specified. If omitted, the currently playing audiobook uri id value is used." + } + } + }, + "save_episode_favorites": { + "name": "Save Episode Favorites", + "description": "Save one or more episodes to the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify episode id's (e.g. `3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4`). A maximum of 50 id's may be specified. If omitted, the currently playing episode uri id value is used." + } + } + }, + "save_show_favorites": { + "name": "Save Show Favorites", + "description": "Save one or more shows to the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify show id's (e.g. `6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk`). A maximum of 50 id's may be specified. If omitted, the currently playing show uri id value is used." + } + } + }, "save_track_favorites": { "name": "Save Track Favorites", "description": "Save one or more tracks to the current user's 'Your Library'.", @@ -1149,12 +1233,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1175,12 +1267,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1201,12 +1301,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1227,12 +1335,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1253,12 +1369,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1279,12 +1403,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1305,12 +1437,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." diff --git a/custom_components/spotifyplus/translations/en.json b/custom_components/spotifyplus/translations/en.json index d94ae9c..ff76b43 100644 --- a/custom_components/spotifyplus/translations/en.json +++ b/custom_components/spotifyplus/translations/en.json @@ -133,7 +133,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -163,7 +163,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -215,7 +215,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -249,7 +249,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "limit_total": { "name": "Limit Total", @@ -297,7 +297,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -327,7 +327,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -429,7 +429,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "after": { "name": "After Time MS", @@ -481,7 +481,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -529,7 +529,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -555,7 +555,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -633,7 +633,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -667,7 +667,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -697,7 +697,7 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." }, "offset": { "name": "Offset", @@ -931,7 +931,7 @@ }, "refresh_device_list": { "name": "Refresh Device List?", - "description": "True to refresh the Spotify Connect device list; otherwise, False to use the Spotify Connect device list cache. Default is False." + "description": "True to refresh the Spotify Connect device list; otherwise, False to use the Spotify Connect device list cache. Default is True." } } }, @@ -1093,6 +1093,48 @@ } } }, + "remove_audiobook_favorites": { + "name": "Remove Audiobook Favorites", + "description": "Remove one or more audiobooks from the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify audiobook id's (e.g. `3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe`). A maximum of 50 id's may be specified. If omitted, the currently playing audiobook uri id value is used." + } + } + }, + "remove_episode_favorites": { + "name": "Remove Episode Favorites", + "description": "Remove one or more episodes from the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify episode id's (e.g. `3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4`). A maximum of 50 id's may be specified. If omitted, the currently playing episode uri id value is used." + } + } + }, + "remove_show_favorites": { + "name": "Remove Show Favorites", + "description": "Remove one or more albums from the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify show id's (e.g. `6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk`). A maximum of 50 id's may be specified. If omitted, the currently playing show uri id value is used." + } + } + }, "remove_track_favorites": { "name": "Remove Track Favorites", "description": "Remove one or more tracks from the current user's 'Your Library'.", @@ -1121,6 +1163,48 @@ } } }, + "save_audiobook_favorites": { + "name": "Save Audiobook Favorites", + "description": "Save one or more audiobook to the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify audiobook id's (e.g. `3PFyizE2tGCSRLusl2Qizf,7iHfbu1YPACw6oZPAFJtqe`). A maximum of 50 id's may be specified. If omitted, the currently playing audiobook uri id value is used." + } + } + }, + "save_episode_favorites": { + "name": "Save Episode Favorites", + "description": "Save one or more episodes to the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify episode id's (e.g. `3F97boSWlXi8OzuhWClZHQ,1hPX5WJY6ja6yopgVPBqm4`). A maximum of 50 id's may be specified. If omitted, the currently playing episode uri id value is used." + } + } + }, + "save_show_favorites": { + "name": "Save Show Favorites", + "description": "Save one or more shows to the current user's 'Your Library'.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Entity ID of the SpotifyPlus device that will make the request to the Spotify Web API." + }, + "ids": { + "name": "ID's", + "description": "A comma-separated list of Spotify show id's (e.g. `6kAsbP8pxwaU2kPibKTuHE,4rOoJ6Egrf8K2IrywzwOMk`). A maximum of 50 id's may be specified. If omitted, the currently playing show uri id value is used." + } + } + }, "save_track_favorites": { "name": "Save Track Favorites", "description": "Save one or more tracks to the current user's 'Your Library'.", @@ -1149,12 +1233,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1175,12 +1267,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1201,12 +1301,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1227,12 +1335,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1253,12 +1369,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1279,12 +1403,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." @@ -1305,12 +1437,20 @@ }, "limit": { "name": "Limit", - "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50." + "description": "The maximum number of items to return in a page of items when manual paging is used. Default is 20, Range is 1 to 50. See the limit_total argument for automatic paging option." + }, + "offset": { + "name": "Offset", + "description": "The page index offset of the first item to return. Use with limit to get the next set of items. Default is 0 (the first item)." }, "market": { "name": "Market / Country Code", "description": "An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. The country associated with the Spotify user account will take priority over this parameter." }, + "include_external": { + "name": "Include External", + "description": "If 'audio' is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response. Allowed values are 'audio'." + }, "limit_total": { "name": "Limit Total", "description": "The maximum number of items to return for the request. If specified, this argument overrides the limit and offset argument values and paging is automatically used to retrieve all available items up to the specified limit total." diff --git a/requirements.txt b/requirements.txt index da840d9..9db6b92 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ colorlog==6.7.0 homeassistant==2024.5.0 ruff==0.1.3 smartinspectPython>=3.0.33 -spotifywebapiPython>=1.0.84 +spotifywebapiPython>=1.0.86