spotifywebapiPython 1.0.65__py3-none-any.whl → 1.0.67__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.

Files changed (22) hide show
  1. {spotifywebapiPython-1.0.65.dist-info → spotifywebapiPython-1.0.67.dist-info}/METADATA +1 -1
  2. {spotifywebapiPython-1.0.65.dist-info → spotifywebapiPython-1.0.67.dist-info}/RECORD +22 -22
  3. spotifywebapipython/const.py +1 -1
  4. spotifywebapipython/docs/__init__.html +17 -2
  5. spotifywebapipython/docs/index.html +2 -2
  6. spotifywebapipython/docs/search.js +1 -1
  7. spotifywebapipython/docs/spotifywebapiPython/const.html +3 -3
  8. spotifywebapipython/docs/spotifywebapiPython/saappmessages.html +2 -2
  9. spotifywebapipython/docs/spotifywebapiPython/sautils.html +2 -2
  10. spotifywebapipython/docs/spotifywebapiPython/spotifyapierror.html +2 -2
  11. spotifywebapipython/docs/spotifywebapiPython/spotifyapimessage.html +2 -2
  12. spotifywebapipython/docs/spotifywebapiPython/spotifyauthtoken.html +2 -2
  13. spotifywebapipython/docs/spotifywebapiPython/spotifyclient.html +5 -4
  14. spotifywebapipython/docs/spotifywebapiPython/spotifydiscovery.html +2 -2
  15. spotifywebapipython/docs/spotifywebapiPython/spotifywebapiauthenticationerror.html +2 -2
  16. spotifywebapipython/docs/spotifywebapiPython/spotifywebapierror.html +2 -2
  17. spotifywebapipython/spotifyclient.py +14 -7
  18. spotifywebapipython/zeroconfapi/zeroconfconnect.py +29 -15
  19. spotifywebapipython/zeroconfapi/zeroconfresponse.py +12 -3
  20. {spotifywebapiPython-1.0.65.dist-info → spotifywebapiPython-1.0.67.dist-info}/LICENSE +0 -0
  21. {spotifywebapiPython-1.0.65.dist-info → spotifywebapiPython-1.0.67.dist-info}/WHEEL +0 -0
  22. {spotifywebapiPython-1.0.65.dist-info → spotifywebapiPython-1.0.67.dist-info}/top_level.txt +0 -0
@@ -29,11 +29,14 @@ class ZeroconfResponse:
29
29
 
30
30
  else:
31
31
 
32
+ # some devices return the `status` and `spotifyError` values as string,
33
+ # while others return them as numeric; use the property setters to
34
+ # convert them to numeric if they are strings that contain a numeric value.
32
35
  self._ResponseSource = root.get('responseSource', None)
33
- self._SpotifyError = root.get('spotifyError', None)
34
- self._Status = root.get('status', None)
36
+ self.SpotifyError = root.get('spotifyError', None)
37
+ self.Status = root.get('status', None)
35
38
  self._StatusString = root.get('statusString', None)
36
-
39
+
37
40
 
38
41
  def __repr__(self) -> str:
39
42
  return self.ToString()
@@ -65,6 +68,9 @@ class ZeroconfResponse:
65
68
  """
66
69
  if isinstance(value, int):
67
70
  self._SpotifyError = value
71
+ elif isinstance(value, str):
72
+ if value.isnumeric():
73
+ self._SpotifyError = int(value)
68
74
 
69
75
 
70
76
  @property
@@ -81,6 +87,9 @@ class ZeroconfResponse:
81
87
  """
82
88
  if isinstance(value, int):
83
89
  self._Status = value
90
+ elif isinstance(value, str):
91
+ if value.isnumeric():
92
+ self._Status = int(value)
84
93
 
85
94
 
86
95
  @property