From 8c71a979caadd41d573563b1fef5386fab3fca66 Mon Sep 17 00:00:00 2001 From: Rafael Moraes <50295204+glomatico@users.noreply.github.com> Date: Thu, 12 Feb 2026 15:03:05 -0300 Subject: [PATCH] Rename track playback API & method to playback info --- votify/api/api.py | 16 ++++++++-------- votify/api/constants.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/votify/api/api.py b/votify/api/api.py index 68e1abf..dd7bd86 100644 --- a/votify/api/api.py +++ b/votify/api/api.py @@ -20,7 +20,7 @@ from .constants import ( SESSION_TOKEN_URL, AUDIO_STREAM_URLS_API_URL, TRACK_CREDITS_API_URL, - TRACK_PLAYBACK_API_URL, + PLAYBACK_INFO_API_URL, VIDEO_MANIFEST_API_URL, WIDEVINE_LICENSE_API_URL, ) @@ -494,7 +494,7 @@ class SpotifyApi: return seek_table - async def get_track_playback_info( + async def get_playback_info( self, media_id: str, media_type: str, @@ -503,7 +503,7 @@ class SpotifyApi: await self._refresh_authorization_if_needed() response = await self.client.get( - TRACK_PLAYBACK_API_URL.format( + PLAYBACK_INFO_API_URL.format( media_id=media_id, media_type=media_type, ), @@ -511,18 +511,18 @@ class SpotifyApi: "manifestFileFormat": file_formats, }, ) - track_playback_info = safe_json(response) + playback_info = safe_json(response) - if response.status_code != 200 or not track_playback_info: + if response.status_code != 200 or not playback_info: raise VotifyRequestException( - name="Track playback info", + name="Playback info", response_status_code=response.status_code, response_text=response.text, ) - logger.debug(f"Received track playback info: {track_playback_info}") + logger.debug(f"Received track playback info: {playback_info}") - return track_playback_info + return playback_info async def get_gid_metadata( self, diff --git a/votify/api/constants.py b/votify/api/constants.py index dbb78fe..58a5cea 100644 --- a/votify/api/constants.py +++ b/votify/api/constants.py @@ -7,7 +7,7 @@ GID_METADATA_URL = ( ) PATHFINDER_API_URL = "https://api-partner.spotify.com/pathfinder/v2/query" VIDEO_MANIFEST_API_URL = "https://gue1-spclient.spotify.com/manifests/v9/json/sources/{file_id}/options/supports_drm" -TRACK_PLAYBACK_API_URL = "https://gue1-spclient.spotify.com/track-playback/v1/media/spotify:{media_type}:{media_id}" +PLAYBACK_INFO_API_URL = "https://gue1-spclient.spotify.com/track-playback/v1/media/spotify:{media_type}:{media_id}" PLAYPLAY_LICENSE_API_URL = "https://gew4-spclient.spotify.com/playplay/v1/key/{file_id}" WIDEVINE_LICENSE_API_URL = ( "https://gue1-spclient.spotify.com/widevine-license/v1/{type}/license"