spotifywebapiPython 1.0.110__py3-none-any.whl → 1.0.112__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of spotifywebapiPython might be problematic. Click here for more details.
- {spotifywebapiPython-1.0.110.dist-info → spotifywebapiPython-1.0.112.dist-info}/METADATA +1 -1
- {spotifywebapiPython-1.0.110.dist-info → spotifywebapiPython-1.0.112.dist-info}/RECORD +22 -22
- spotifywebapipython/const.py +1 -1
- spotifywebapipython/docs/__init__.html +14 -2
- spotifywebapipython/docs/index.html +2 -2
- spotifywebapipython/docs/search.js +1 -1
- spotifywebapipython/docs/spotifywebapipython/const.html +3 -3
- spotifywebapipython/docs/spotifywebapipython/saappmessages.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/sautils.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifyclient.html +18 -6
- spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html +2 -2
- spotifywebapipython/models/artistinfotourevent.py +2 -1
- spotifywebapipython/spotifyclient.py +57 -16
- spotifywebapipython/zeroconfapi/zeroconfconnect.py +23 -23
- {spotifywebapiPython-1.0.110.dist-info → spotifywebapiPython-1.0.112.dist-info}/LICENSE +0 -0
- {spotifywebapiPython-1.0.110.dist-info → spotifywebapiPython-1.0.112.dist-info}/WHEEL +0 -0
- {spotifywebapiPython-1.0.110.dist-info → spotifywebapiPython-1.0.112.dist-info}/top_level.txt +0 -0
|
@@ -543,8 +543,8 @@ class ZeroconfConnect:
|
|
|
543
543
|
|
|
544
544
|
# set request headers.
|
|
545
545
|
reqHeaders:dict = {
|
|
546
|
-
|
|
547
|
-
|
|
546
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
547
|
+
"Connection": "close"
|
|
548
548
|
}
|
|
549
549
|
|
|
550
550
|
# set defaults used by most manufacturers - we will tailor these in the
|
|
@@ -552,14 +552,14 @@ class ZeroconfConnect:
|
|
|
552
552
|
# - exclude origin device information from the addUser request.
|
|
553
553
|
# - tokenType should be set to 'default'.
|
|
554
554
|
includeOriginDeviceInfo:bool = False
|
|
555
|
-
tokenType:str =
|
|
555
|
+
tokenType:str = "default"
|
|
556
556
|
|
|
557
557
|
# include the origin device information if PublicKey="INVALID" (base64 encoded) and availability="NOT-LOADED".
|
|
558
|
-
if (info.PublicKey ==
|
|
558
|
+
if (info.PublicKey == "SU5WQUxJRA==") and (info.Availability == "NOT-LOADED"):
|
|
559
559
|
includeOriginDeviceInfo = True
|
|
560
560
|
|
|
561
561
|
# special processing for librespot, spotifyd.
|
|
562
|
-
if info.ModelDisplayName ==
|
|
562
|
+
if info.ModelDisplayName == "librespot":
|
|
563
563
|
|
|
564
564
|
# trace.
|
|
565
565
|
_logsi.LogVerbose("Spotify Connect token type is '%s' - using librespot authorization credentials to connect: '%s' (ip=%s)" % (info.TokenType, info.RemoteName, self._HostIpAddress))
|
|
@@ -649,20 +649,20 @@ class ZeroconfConnect:
|
|
|
649
649
|
# - tokenType should be set to 'default'.
|
|
650
650
|
clientKey:str = builder.dh_keys.PublicKeyBase64String
|
|
651
651
|
includeOriginDeviceInfo = False
|
|
652
|
-
tokenType =
|
|
652
|
+
tokenType = "default"
|
|
653
653
|
|
|
654
654
|
# formulate the blob.
|
|
655
655
|
blob = builder.build()
|
|
656
656
|
|
|
657
657
|
# set request parameters.
|
|
658
658
|
reqData={
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
659
|
+
"action": "addUser",
|
|
660
|
+
"version": self.Version, # info.Version,
|
|
661
|
+
"tokenType": tokenType,
|
|
662
|
+
"clientKey": clientKey,
|
|
663
|
+
"loginId": loginId or '', # canonical login id (e.g. "31l77fd87g8h9j00k89f07jf87ge")
|
|
664
|
+
"userName": credentials.username.decode("ascii"), # canonical user name (e.g. "31l77fd87g8h9j00k89f07jf87ge")
|
|
665
|
+
"blob": blob,
|
|
666
666
|
}
|
|
667
667
|
|
|
668
668
|
# are we including origin device information (e.g. deviceName, deviceId)?
|
|
@@ -1028,21 +1028,21 @@ class ZeroconfConnect:
|
|
|
1028
1028
|
delay = validateDelay(delay, 0.50, 10)
|
|
1029
1029
|
|
|
1030
1030
|
# set request endpoint.
|
|
1031
|
-
endpoint:str = self.GetEndpoint(
|
|
1031
|
+
endpoint:str = self.GetEndpoint("resetUsers")
|
|
1032
1032
|
if ignoreStatusResult is None:
|
|
1033
1033
|
ignoreStatusResult = False
|
|
1034
1034
|
|
|
1035
1035
|
# set request headers.
|
|
1036
1036
|
reqHeaders:dict = {
|
|
1037
|
-
|
|
1038
|
-
|
|
1037
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
1038
|
+
"Connection": "close"
|
|
1039
1039
|
}
|
|
1040
1040
|
_logsi.LogDictionary(SILevel.Debug, "ZeroconfConnect http request: '%s' (headers)" % (endpoint), reqHeaders)
|
|
1041
1041
|
|
|
1042
1042
|
# set request parameters.
|
|
1043
1043
|
reqData={
|
|
1044
|
-
|
|
1045
|
-
|
|
1044
|
+
"action": "resetUsers",
|
|
1045
|
+
"version": self.Version,
|
|
1046
1046
|
}
|
|
1047
1047
|
_logsi.LogDictionary(SILevel.Verbose, "ZeroconfConnect http request: '%s' (data)" % (endpoint), reqData)
|
|
1048
1048
|
|
|
@@ -1195,19 +1195,19 @@ class ZeroconfConnect:
|
|
|
1195
1195
|
_logsi.LogMethodParmList(SILevel.Verbose, "Get information from Spotify Connect Zeroconf API (ip=%s)" % self._HostIpAddress, apiMethodParms)
|
|
1196
1196
|
|
|
1197
1197
|
# set request endpoint.
|
|
1198
|
-
endpoint:str = self.GetEndpoint(
|
|
1198
|
+
endpoint:str = self.GetEndpoint("getInfo")
|
|
1199
1199
|
|
|
1200
1200
|
# set request headers.
|
|
1201
1201
|
reqHeaders:dict = {
|
|
1202
|
-
|
|
1203
|
-
|
|
1202
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
1203
|
+
"Connection": "close"
|
|
1204
1204
|
}
|
|
1205
1205
|
_logsi.LogDictionary(SILevel.Debug, "ZeroconfConnect http request: '%s' (headers)" % (endpoint), reqHeaders)
|
|
1206
1206
|
|
|
1207
1207
|
# set request parameters.
|
|
1208
1208
|
reqParams={
|
|
1209
|
-
|
|
1210
|
-
|
|
1209
|
+
"action": "getInfo",
|
|
1210
|
+
"version": self.Version,
|
|
1211
1211
|
}
|
|
1212
1212
|
_logsi.LogDictionary(SILevel.Verbose, "ZeroconfConnect http request: '%s' (params)" % (endpoint), reqParams)
|
|
1213
1213
|
|
|
File without changes
|
|
File without changes
|
{spotifywebapiPython-1.0.110.dist-info → spotifywebapiPython-1.0.112.dist-info}/top_level.txt
RENAMED
|
File without changes
|