We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2675ca3 commit 14690c7Copy full SHA for 14690c7
1 file changed
src/spotifyaio/spotify.py
@@ -50,6 +50,8 @@
50
if TYPE_CHECKING:
51
from spotifyaio import SimplifiedAlbum, Track
52
53
+VERSION = metadata.version(__package__)
54
+
55
56
@dataclass
57
class SpotifyClient:
@@ -80,7 +82,6 @@ async def _request(
80
82
params: dict[str, Any] | None = None,
81
83
) -> str:
84
"""Handle a request to Spotify."""
- version = metadata.version(__package__)
85
url = URL.build(
86
scheme="https",
87
host=self.api_host,
@@ -90,7 +91,7 @@ async def _request(
90
91
await self.refresh_token()
92
93
headers = {
- "User-Agent": f"AioSpotify/{version}",
94
+ "User-Agent": f"AioSpotify/{VERSION}",
95
"Accept": "application/json, text/plain, */*",
96
"Authorization": f"Bearer {self._token}",
97
}
0 commit comments