spotifywebapiPython 1.0.158__py3-none-any.whl → 1.0.159__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.158.dist-info → spotifywebapiPython-1.0.159.dist-info}/METADATA +1 -1
- {spotifywebapiPython-1.0.158.dist-info → spotifywebapiPython-1.0.159.dist-info}/RECORD +25 -25
- spotifywebapipython/const.py +1 -1
- spotifywebapipython/docs/__init__.html +8 -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 +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html +2 -2
- spotifywebapipython/spotifyconnect/spotifyconnectdirectorytask.py +12 -8
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastlistener.py +6 -6
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconflistener.py +7 -7
- spotifywebapipython/spotifydiscovery.py +2 -2
- spotifywebapipython/zeroconfapi/zeroconfconnect.py +7 -2
- {spotifywebapiPython-1.0.158.dist-info → spotifywebapiPython-1.0.159.dist-info}/LICENSE +0 -0
- {spotifywebapiPython-1.0.158.dist-info → spotifywebapiPython-1.0.159.dist-info}/WHEEL +0 -0
- {spotifywebapiPython-1.0.158.dist-info → spotifywebapiPython-1.0.159.dist-info}/top_level.txt +0 -0
|
@@ -67,7 +67,7 @@ class SpotifyDiscovery:
|
|
|
67
67
|
self._DiscoveryResults:list[ZeroconfDiscoveryResult] = []
|
|
68
68
|
self._PrintToConsole:bool = printToConsole
|
|
69
69
|
self._ZeroconfClient = zeroconfClient
|
|
70
|
-
self.
|
|
70
|
+
self._Zeroconf_RLock = threading.RLock()
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
def __getitem__(self, key):
|
|
@@ -293,7 +293,7 @@ class SpotifyDiscovery:
|
|
|
293
293
|
# > the only way to remove an entry is to kill the process the entry was created under!
|
|
294
294
|
|
|
295
295
|
# enter the following section one thread at a time (threadsafe).
|
|
296
|
-
with self.
|
|
296
|
+
with self._Zeroconf_RLock:
|
|
297
297
|
|
|
298
298
|
# copy passed parameters to thread-safe storage.
|
|
299
299
|
serviceType:str = service_type
|
|
@@ -1214,15 +1214,20 @@ class ZeroconfConnect:
|
|
|
1214
1214
|
# try connecting to the device until we timeout or there are no more "connection refused" errors.
|
|
1215
1215
|
loopTotalDelay:float = 0
|
|
1216
1216
|
LOOP_DELAY:float = 0.25
|
|
1217
|
-
LOOP_TIMEOUT:float = 2.0
|
|
1217
|
+
LOOP_TIMEOUT:float = 1.0 # this is the number of tries (not seconds to wait); 1.0 = 4 tries, 2.0 = 8 tries, etc.
|
|
1218
1218
|
while True:
|
|
1219
1219
|
|
|
1220
1220
|
try:
|
|
1221
1221
|
|
|
1222
|
+
# if device connection was previously delayed, then log the info
|
|
1223
|
+
# as it may be helpful in debugging other issues.
|
|
1224
|
+
if (loopTotalDelay > 0):
|
|
1225
|
+
_logsi.LogVerbose("Re-trying to reach Spotify Connect device (ip=%s:%s) after %f seconds from initial request" % (self._HostIpAddress, self._HostIpPort, loopTotalDelay))
|
|
1226
|
+
|
|
1222
1227
|
# execute spotify zeroconf api request.
|
|
1223
1228
|
response = requests.get(
|
|
1224
1229
|
self._Uri,
|
|
1225
|
-
timeout=
|
|
1230
|
+
timeout=4,
|
|
1226
1231
|
headers=reqHeaders,
|
|
1227
1232
|
params=reqParams
|
|
1228
1233
|
)
|
|
File without changes
|
|
File without changes
|
{spotifywebapiPython-1.0.158.dist-info → spotifywebapiPython-1.0.159.dist-info}/top_level.txt
RENAMED
|
File without changes
|