spotifywebapiPython 1.0.138__py3-none-any.whl → 1.0.140__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.138.dist-info → spotifywebapiPython-1.0.140.dist-info}/METADATA +1 -1
- {spotifywebapiPython-1.0.138.dist-info → spotifywebapiPython-1.0.140.dist-info}/RECORD +23 -23
- 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 +4 -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 +7 -7
- spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html +2 -2
- spotifywebapipython/models/spotifyconnectdevices.py +23 -0
- spotifywebapipython/sautils.py +6 -1
- spotifywebapipython/spotifyclient.py +33 -26
- spotifywebapipython/spotifydiscovery.py +10 -11
- {spotifywebapiPython-1.0.138.dist-info → spotifywebapiPython-1.0.140.dist-info}/LICENSE +0 -0
- {spotifywebapiPython-1.0.138.dist-info → spotifywebapiPython-1.0.140.dist-info}/WHEEL +0 -0
- {spotifywebapiPython-1.0.138.dist-info → spotifywebapiPython-1.0.140.dist-info}/top_level.txt +0 -0
|
@@ -126,10 +126,10 @@ class SpotifyDiscovery:
|
|
|
126
126
|
return self._DiscoveryResults
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
def
|
|
129
|
+
def GetIndexByKey(self, value:str) -> int:
|
|
130
130
|
"""
|
|
131
131
|
Returns the index of the `DiscoveryResults` collection that contains
|
|
132
|
-
the specified device
|
|
132
|
+
the specified device key value; otherwise, -1.
|
|
133
133
|
"""
|
|
134
134
|
result:int = -1
|
|
135
135
|
if value is None:
|
|
@@ -140,7 +140,7 @@ class SpotifyDiscovery:
|
|
|
140
140
|
|
|
141
141
|
# process all discovered devices.
|
|
142
142
|
for i in range(len(self._DiscoveryResults)):
|
|
143
|
-
if (self._DiscoveryResults[i].
|
|
143
|
+
if (self._DiscoveryResults[i].Key.lower() == value):
|
|
144
144
|
result = i
|
|
145
145
|
break
|
|
146
146
|
return result
|
|
@@ -328,20 +328,19 @@ class SpotifyDiscovery:
|
|
|
328
328
|
# add device name to list of registered names.
|
|
329
329
|
self._DiscoveredDeviceNames[result.Id] = result.DeviceName
|
|
330
330
|
|
|
331
|
-
# add / update discovered results by
|
|
332
|
-
#
|
|
333
|
-
#
|
|
334
|
-
#
|
|
335
|
-
|
|
336
|
-
# ip port value.
|
|
337
|
-
idx:int = self.GetIndexById(result.Id)
|
|
331
|
+
# add / update discovered results by serviceinfo key value.
|
|
332
|
+
# we use the serviceinfo KEY value (not SERVERKEY) since some manufacturers use random ip port
|
|
333
|
+
# numbers, and the port number could have been updated. in this case, the key SHOULD remain the same.
|
|
334
|
+
# note that a different serviceinfo key SHOULD be created for speaker groups; at least they are for BOSE devices.
|
|
335
|
+
idx:int = self.GetIndexByKey(result.Key)
|
|
338
336
|
if (idx == -1):
|
|
339
337
|
self._DiscoveryResults.append(result) # add new result
|
|
338
|
+
_logsi.LogVerbose("Spotify Connect Zeroconf service discovery result was added: %s (%s)" % (result.Id, serviceStateChangeDesc))
|
|
340
339
|
else:
|
|
341
340
|
self._DiscoveryResults[idx] = result # update existing result
|
|
341
|
+
_logsi.LogVerbose("Spotify Connect Zeroconf service discovery result was updated: %s (%s)" % (result.Id, serviceStateChangeDesc))
|
|
342
342
|
|
|
343
343
|
# trace.
|
|
344
|
-
_logsi.LogVerbose("Spotify Connect Zeroconf service %s: %s" % (serviceStateChangeDesc, result.Id))
|
|
345
344
|
if (self._PrintToConsole == True):
|
|
346
345
|
print("Spotify Connect Zeroconf service %s: %s" % (serviceStateChangeDesc, result.Id))
|
|
347
346
|
|
|
File without changes
|
|
File without changes
|
{spotifywebapiPython-1.0.138.dist-info → spotifywebapiPython-1.0.140.dist-info}/top_level.txt
RENAMED
|
File without changes
|