spotifywebapiPython 1.0.161__py3-none-any.whl → 1.0.163__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.161.dist-info → spotifywebapiPython-1.0.163.dist-info}/METADATA +1 -1
- {spotifywebapiPython-1.0.161.dist-info → spotifywebapiPython-1.0.163.dist-info}/RECORD +22 -22
- spotifywebapipython/const.py +1 -1
- spotifywebapipython/docs/__init__.html +15 -3
- 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 +13 -36
- 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/spotifyclient.py +21 -43
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastlistener.py +3 -2
- {spotifywebapiPython-1.0.161.dist-info → spotifywebapiPython-1.0.163.dist-info}/LICENSE +0 -0
- {spotifywebapiPython-1.0.161.dist-info → spotifywebapiPython-1.0.163.dist-info}/WHEEL +0 -0
- {spotifywebapiPython-1.0.161.dist-info → spotifywebapiPython-1.0.163.dist-info}/top_level.txt +0 -0
|
@@ -487,7 +487,7 @@ class SpotifyClient:
|
|
|
487
487
|
|
|
488
488
|
# if deviceId could not be resolved, then it's an error.
|
|
489
489
|
if (deviceId is None) or (deviceId == "*"):
|
|
490
|
-
raise SpotifyConnectDeviceNotFound("There is no active Spotify player, and a default player device was not configured.")
|
|
490
|
+
raise SpotifyConnectDeviceNotFound("There is no active Spotify player device, and a default player device was not configured.")
|
|
491
491
|
else:
|
|
492
492
|
raise SpotifyConnectDeviceNotFound("Spotify Player device \"%s\" was not found in the Spotify Connect device list; verify the device is discoverable via Zeroconf on the local network." % (deviceId))
|
|
493
493
|
|
|
@@ -1191,10 +1191,7 @@ class SpotifyClient:
|
|
|
1191
1191
|
not be resolved or activated.
|
|
1192
1192
|
Examples are `0d1841b0976bae2a3a310dd74c0f3df354899bc8`, `Office`, `*`, None.
|
|
1193
1193
|
verifyDeviceId (bool):
|
|
1194
|
-
DEPRECATED -
|
|
1195
|
-
True to verify a device id is active; otherwise, false to assume that a
|
|
1196
|
-
device id is already active.
|
|
1197
|
-
Default is True.
|
|
1194
|
+
DEPRECATED - no longer used, but left here to maintain compatibility.
|
|
1198
1195
|
delay (float):
|
|
1199
1196
|
Time delay (in seconds) to wait AFTER issuing the add request. This delay will give the
|
|
1200
1197
|
Spotify web api time to process the queue change before another command is issued.
|
|
@@ -2039,10 +2036,10 @@ class SpotifyClient:
|
|
|
2039
2036
|
The Spotify ID of the playlist.
|
|
2040
2037
|
Example: `3cEYpjA9oz9GiPac4AsH4n`
|
|
2041
2038
|
userIds (str):
|
|
2039
|
+
DEPRECATED - A single item list containing current user's Spotify Username; Maximum of 1 id.
|
|
2042
2040
|
A comma-separated list of Spotify User ID's to check.
|
|
2043
2041
|
Maximum: 5 ID's.
|
|
2044
2042
|
Example: `1kWUud3vY5ij5r62zxpTRy,2takcwOaAZWiXQijPHIx7B`
|
|
2045
|
-
DEPRECATED - A single item list containing current user's Spotify Username; Maximum of 1 id.
|
|
2046
2043
|
|
|
2047
2044
|
Returns:
|
|
2048
2045
|
Array of boolean, containing a single boolean status that indicates
|
|
@@ -9593,19 +9590,13 @@ class SpotifyClient:
|
|
|
9593
9590
|
The device id / name value to check.
|
|
9594
9591
|
verifyUserContext (bool):
|
|
9595
9592
|
DEPRECATED - no longer used, but left here to maintain compatibility.
|
|
9596
|
-
If True, the active user context of the resolved device is checked to ensure it
|
|
9597
|
-
matches the user context specified on the class constructor.
|
|
9598
|
-
If False, the user context will not be checked.
|
|
9599
|
-
Default is True.
|
|
9600
9593
|
verifyTimeout (float):
|
|
9601
9594
|
Maximum time to wait (in seconds) for the device to become active in the Spotify
|
|
9602
9595
|
Connect device list. This value is only used if a Connect command has to be
|
|
9603
9596
|
issued to activate the device.
|
|
9604
9597
|
Default is 5; value range is 0 - 10.
|
|
9605
9598
|
refreshDeviceList (bool):
|
|
9606
|
-
|
|
9607
|
-
Spotify Connect device list cache.
|
|
9608
|
-
Default is False.
|
|
9599
|
+
DEPRECATED - no longer used, but left here to maintain compatibility.
|
|
9609
9600
|
activateDevice (bool):
|
|
9610
9601
|
True to activate the device if necessary; otherwise, False.
|
|
9611
9602
|
Default is True.
|
|
@@ -9664,7 +9655,7 @@ class SpotifyClient:
|
|
|
9664
9655
|
apiMethodParms.AppendKeyValue("deviceValue", deviceValue)
|
|
9665
9656
|
apiMethodParms.AppendKeyValue("verifyUserContext (DEPRECATED)", verifyUserContext)
|
|
9666
9657
|
apiMethodParms.AppendKeyValue("verifyTimeout", verifyTimeout)
|
|
9667
|
-
apiMethodParms.AppendKeyValue("refreshDeviceList", refreshDeviceList)
|
|
9658
|
+
apiMethodParms.AppendKeyValue("refreshDeviceList (DEPRECATED)", refreshDeviceList)
|
|
9668
9659
|
apiMethodParms.AppendKeyValue("activateDevice", activateDevice)
|
|
9669
9660
|
apiMethodParms.AppendKeyValue("delay", delay)
|
|
9670
9661
|
_logsi.LogMethodParmList(SILevel.Verbose, "Get Spotify Connect Device object for deviceValue \"%s\"" % (deviceValue), apiMethodParms)
|
|
@@ -9674,8 +9665,6 @@ class SpotifyClient:
|
|
|
9674
9665
|
verifyTimeout = validateDelay(verifyTimeout, 5, 10)
|
|
9675
9666
|
if (activateDevice is None):
|
|
9676
9667
|
activateDevice = True
|
|
9677
|
-
if (refreshDeviceList is None):
|
|
9678
|
-
refreshDeviceList = False
|
|
9679
9668
|
|
|
9680
9669
|
# resolve the device id from the specified device value.
|
|
9681
9670
|
# returned value will be null if the device could not be resolved!
|
|
@@ -9802,9 +9791,9 @@ class SpotifyClient:
|
|
|
9802
9791
|
if sonosMusicSource != "SPOTIFY_CONNECT":
|
|
9803
9792
|
_logsi.LogVerbose("Sonos device %s music source after Connect is not SPOTIFY_CONNECT; it will probably fail to play" % (scDevice.Title))
|
|
9804
9793
|
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9794
|
+
# at this point the Sonos music source should be set to SPOTIFY_CONNECT, and control
|
|
9795
|
+
# transferred to the device. note that the Sonos device will still NOT appear in the
|
|
9796
|
+
# player device list, but SHOULD be the active (restricted) device in player state.
|
|
9808
9797
|
|
|
9809
9798
|
# wait for the device to enter the Spotify Web API player device list, or
|
|
9810
9799
|
# to become the active device.
|
|
@@ -9876,10 +9865,7 @@ class SpotifyClient:
|
|
|
9876
9865
|
True (default) to return real-time information about devices and update the cache;
|
|
9877
9866
|
otherwise, False to just return the cached value.
|
|
9878
9867
|
sortResult (bool):
|
|
9879
|
-
DEPRECATED - no longer used,
|
|
9880
|
-
True to sort the items by name; otherwise, False to leave the items in the same order they
|
|
9881
|
-
were returned in by the Spotify Web API.
|
|
9882
|
-
Default: True
|
|
9868
|
+
DEPRECATED - no longer used, but left here to maintain compatibility.
|
|
9883
9869
|
|
|
9884
9870
|
Returns:
|
|
9885
9871
|
A `SpotifyConnectDevices` object that contain Spotify Connect devices that are registered
|
|
@@ -11696,10 +11682,7 @@ class SpotifyClient:
|
|
|
11696
11682
|
another command is issued.
|
|
11697
11683
|
Default is 0.50; value range is 0 - 10.
|
|
11698
11684
|
resolveDeviceId (bool):
|
|
11699
|
-
DEPRECATED -
|
|
11700
|
-
True to resolve the supplied `deviceId` value; otherwise, False not resolve the `deviceId`
|
|
11701
|
-
value as it has already been resolved.
|
|
11702
|
-
Default is True.
|
|
11685
|
+
DEPRECATED - no longer used, but left here to maintain compatibility.
|
|
11703
11686
|
|
|
11704
11687
|
Raises:
|
|
11705
11688
|
SpotifyWebApiError:
|
|
@@ -11846,11 +11829,16 @@ class SpotifyClient:
|
|
|
11846
11829
|
reqData:dict = \
|
|
11847
11830
|
{
|
|
11848
11831
|
'context_uri': contextUri,
|
|
11849
|
-
'position_ms': positionMS
|
|
11850
11832
|
}
|
|
11833
|
+
|
|
11834
|
+
if (positionMS is not None) and (positionMS > 0):
|
|
11835
|
+
reqData['position_ms'] = { 'position_ms': positionMS }
|
|
11836
|
+
|
|
11837
|
+
# offset should only be applied if it's not zer / a uri is specified; otherwise,
|
|
11838
|
+
# it will not shuffle correctly if shuffle is enabled.
|
|
11851
11839
|
if offsetUri is not None:
|
|
11852
11840
|
reqData['offset'] = { 'uri': offsetUri }
|
|
11853
|
-
|
|
11841
|
+
elif (offsetPosition > 0):
|
|
11854
11842
|
reqData['offset'] = { 'position': offsetPosition }
|
|
11855
11843
|
|
|
11856
11844
|
# formulate url parms; will manually add them since we are adding json body as well.
|
|
@@ -11916,10 +11904,7 @@ class SpotifyClient:
|
|
|
11916
11904
|
another command is issued.
|
|
11917
11905
|
Default is 0.50; value range is 0 - 10.
|
|
11918
11906
|
resolveDeviceId (bool):
|
|
11919
|
-
DEPRECATED -
|
|
11920
|
-
True to resolve the supplied `deviceId` value; otherwise, False not resolve the `deviceId`
|
|
11921
|
-
value as it has already been resolved.
|
|
11922
|
-
Default is True.
|
|
11907
|
+
DEPRECATED - no longer used, but left here to maintain compatibility.
|
|
11923
11908
|
limitTotal (int):
|
|
11924
11909
|
The maximum number of items to retrieve from favorites.
|
|
11925
11910
|
Default is 200; value range is 1 - 750.
|
|
@@ -12053,10 +12038,7 @@ class SpotifyClient:
|
|
|
12053
12038
|
another command is issued.
|
|
12054
12039
|
Default is 0.50; value range is 0 - 10.
|
|
12055
12040
|
resolveDeviceId (bool):
|
|
12056
|
-
DEPRECATED -
|
|
12057
|
-
True to resolve the supplied `deviceId` value; otherwise, False not resolve the `deviceId`
|
|
12058
|
-
value as it has already been resolved.
|
|
12059
|
-
Default is True.
|
|
12041
|
+
DEPRECATED - no longer used, but left here to maintain compatibility.
|
|
12060
12042
|
|
|
12061
12043
|
Raises:
|
|
12062
12044
|
SpotifyWebApiError:
|
|
@@ -13119,9 +13101,7 @@ class SpotifyClient:
|
|
|
13119
13101
|
another command is issued.
|
|
13120
13102
|
Default is 0.50; value range is 0 - 10.
|
|
13121
13103
|
refreshDeviceList (bool):
|
|
13122
|
-
|
|
13123
|
-
Spotify Connect device list cache.
|
|
13124
|
-
Default is True.
|
|
13104
|
+
DEPRECATED - no longer used, but left here to maintain compatibility.
|
|
13125
13105
|
forceActivateDevice (bool):
|
|
13126
13106
|
True to issue a Spotify Connect Disconnect call prior to transfer, which will
|
|
13127
13107
|
force the device to reconnect to Spotify Connect; otherwise, False to not
|
|
@@ -13172,7 +13152,7 @@ class SpotifyClient:
|
|
|
13172
13152
|
apiMethodParms.AppendKeyValue("deviceId", deviceId)
|
|
13173
13153
|
apiMethodParms.AppendKeyValue("play", play)
|
|
13174
13154
|
apiMethodParms.AppendKeyValue("delay", delay)
|
|
13175
|
-
apiMethodParms.AppendKeyValue("refreshDeviceList", refreshDeviceList)
|
|
13155
|
+
apiMethodParms.AppendKeyValue("refreshDeviceList (DEPRECATED)", refreshDeviceList)
|
|
13176
13156
|
apiMethodParms.AppendKeyValue("forceActivateDevice", forceActivateDevice)
|
|
13177
13157
|
apiMethodParms.AppendKeyValue("deviceIdFrom", deviceIdFrom)
|
|
13178
13158
|
_logsi.LogMethodParmList(SILevel.Verbose, "Transfer playback to a new Spotify Connect device", apiMethodParms)
|
|
@@ -13181,8 +13161,6 @@ class SpotifyClient:
|
|
|
13181
13161
|
delay = validateDelay(delay, 0.50, 10)
|
|
13182
13162
|
if (play is None):
|
|
13183
13163
|
play = True
|
|
13184
|
-
if (refreshDeviceList is None):
|
|
13185
|
-
refreshDeviceList = True
|
|
13186
13164
|
if (forceActivateDevice is None):
|
|
13187
13165
|
forceActivateDevice = True
|
|
13188
13166
|
|
|
@@ -125,8 +125,9 @@ class SpotifyConnectZeroconfCastListener(AbstractCastListener):
|
|
|
125
125
|
result.ServerKey = serviceName
|
|
126
126
|
result.ServiceType = ZEROCONF_SERVICETYPE_GOOGLECAST
|
|
127
127
|
result.Weight = 0
|
|
128
|
-
result.Properties.append(ZeroconfProperty("CPath","/na"))
|
|
129
|
-
result.Properties.append(ZeroconfProperty("VERSION","1.0"))
|
|
128
|
+
result.Properties.append(ZeroconfProperty("CPath", "/na"))
|
|
129
|
+
result.Properties.append(ZeroconfProperty("VERSION", "1.0"))
|
|
130
|
+
result.Properties.append(ZeroconfProperty("cast_type", castType))
|
|
130
131
|
result.SpotifyConnectCPath = "/na"
|
|
131
132
|
result.SpotifyConnectVersion = "1.0"
|
|
132
133
|
result.Id = "\"%s\" (%s:%s)" % (result.DeviceName, result.HostIpAddress, result.HostIpPort)
|
|
File without changes
|
|
File without changes
|
{spotifywebapiPython-1.0.161.dist-info → spotifywebapiPython-1.0.163.dist-info}/top_level.txt
RENAMED
|
File without changes
|