spotifywebapiPython 1.0.92__py3-none-any.whl → 1.0.94__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.92.dist-info → spotifywebapiPython-1.0.94.dist-info}/METADATA +1 -1
- {spotifywebapiPython-1.0.92.dist-info → spotifywebapiPython-1.0.94.dist-info}/RECORD +40 -40
- spotifywebapipython/const.py +1 -1
- spotifywebapipython/docs/__init__.html +18 -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/models/albumsimplified.py +1 -0
- spotifywebapipython/models/artist.py +1 -0
- spotifywebapipython/models/artistsimplified.py +4 -0
- spotifywebapipython/models/audiobooksimplified.py +1 -0
- spotifywebapipython/models/chaptersimplified.py +3 -2
- spotifywebapipython/models/context.py +1 -3
- spotifywebapipython/models/device.py +5 -2
- spotifywebapipython/models/episodesaved.py +2 -2
- spotifywebapipython/models/episodesimplified.py +2 -1
- spotifywebapipython/models/pageobject.py +2 -2
- spotifywebapipython/models/playlistsimplified.py +2 -1
- spotifywebapipython/models/showsaved.py +2 -2
- spotifywebapipython/models/showsimplified.py +6 -1
- spotifywebapipython/models/spotifyconnectdevice.py +1 -0
- spotifywebapipython/models/spotifyconnectdevices.py +1 -0
- spotifywebapipython/models/tracksimplified.py +2 -2
- spotifywebapipython/models/userprofilesimplified.py +1 -0
- spotifywebapipython/models/zeroconfdiscoveryresult.py +2 -1
- spotifywebapipython/spotifyclient.py +73 -49
- spotifywebapipython/zeroconfapi/zeroconfgetinfo.py +5 -0
- spotifywebapipython/zeroconfapi/zeroconfgetinfoalias.py +1 -0
- {spotifywebapiPython-1.0.92.dist-info → spotifywebapiPython-1.0.94.dist-info}/LICENSE +0 -0
- {spotifywebapiPython-1.0.92.dist-info → spotifywebapiPython-1.0.94.dist-info}/WHEEL +0 -0
- {spotifywebapiPython-1.0.92.dist-info → spotifywebapiPython-1.0.94.dist-info}/top_level.txt +0 -0
|
@@ -289,6 +289,7 @@ class SpotifyConnectDevices():
|
|
|
289
289
|
"""
|
|
290
290
|
result:dict = \
|
|
291
291
|
{
|
|
292
|
+
'AgeLastRefreshed': self.AgeLastRefreshed,
|
|
292
293
|
'DateLastRefreshed': self._DateLastRefreshed,
|
|
293
294
|
'ItemsCount': self.ItemsCount,
|
|
294
295
|
'Items': [ item.ToDictionary() for item in self._Items ],
|
|
@@ -139,7 +139,7 @@ class TrackSimplified:
|
|
|
139
139
|
@property
|
|
140
140
|
def Explicit(self) -> bool:
|
|
141
141
|
"""
|
|
142
|
-
Whether or not the track has explicit
|
|
142
|
+
Whether or not the track has explicit content (true = yes it does; false = no it does not OR unknown).
|
|
143
143
|
"""
|
|
144
144
|
return self._Explicit
|
|
145
145
|
|
|
@@ -198,7 +198,7 @@ class TrackSimplified:
|
|
|
198
198
|
@property
|
|
199
199
|
def Name(self) -> str:
|
|
200
200
|
"""
|
|
201
|
-
The name of the
|
|
201
|
+
The name of the track.
|
|
202
202
|
"""
|
|
203
203
|
return self._Name
|
|
204
204
|
|
|
@@ -349,7 +349,7 @@ class ZeroconfDiscoveryResult:
|
|
|
349
349
|
@property
|
|
350
350
|
def SpotifyConnectIsInDeviceList(self) -> bool:
|
|
351
351
|
"""
|
|
352
|
-
Spotify
|
|
352
|
+
True if the device is in the Spotify Player active device list; otherwise, False.
|
|
353
353
|
"""
|
|
354
354
|
return self._SpotifyConnectIsInDeviceList
|
|
355
355
|
|
|
@@ -435,6 +435,7 @@ class ZeroconfDiscoveryResult:
|
|
|
435
435
|
'HostIpAddresses': [ str(item) for item in self._HostIpAddresses ],
|
|
436
436
|
'HostIpPort': self._HostIpPort,
|
|
437
437
|
'HostTTL': self._HostTTL,
|
|
438
|
+
'IsDynamicDevice': self.IsDynamicDevice,
|
|
438
439
|
'Key': self._Key,
|
|
439
440
|
'Name': self._Name,
|
|
440
441
|
'Priority': self._Priority,
|
|
@@ -2713,9 +2713,12 @@ class SpotifyClient:
|
|
|
2713
2713
|
# update result object with final paging details.
|
|
2714
2714
|
result.Total = pageObj.Total
|
|
2715
2715
|
|
|
2716
|
-
# sort items
|
|
2717
|
-
if (len(result.Items) > 0)
|
|
2718
|
-
|
|
2716
|
+
# sort result items.
|
|
2717
|
+
if (len(result.Items) > 0):
|
|
2718
|
+
if (sortResult is True):
|
|
2719
|
+
result.Items.sort(key=lambda x: (x.Album.Name or "").lower(), reverse=False)
|
|
2720
|
+
else:
|
|
2721
|
+
result.Items.sort(key=lambda x: (x.AddedAt or "").lower(), reverse=True)
|
|
2719
2722
|
|
|
2720
2723
|
# trace.
|
|
2721
2724
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -2875,9 +2878,10 @@ class SpotifyClient:
|
|
|
2875
2878
|
# update result object with final paging details.
|
|
2876
2879
|
result.Total = pageObj.Total
|
|
2877
2880
|
|
|
2878
|
-
# sort items
|
|
2879
|
-
if (len(result.Items) > 0)
|
|
2880
|
-
|
|
2881
|
+
# sort result items.
|
|
2882
|
+
if (len(result.Items) > 0):
|
|
2883
|
+
if (sortResult is True):
|
|
2884
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
2881
2885
|
|
|
2882
2886
|
# trace.
|
|
2883
2887
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -3406,9 +3410,10 @@ class SpotifyClient:
|
|
|
3406
3410
|
# update result object with final paging details.
|
|
3407
3411
|
result.Total = pageObj.Total
|
|
3408
3412
|
|
|
3409
|
-
# sort items
|
|
3410
|
-
if (len(result.Items) > 0)
|
|
3411
|
-
|
|
3413
|
+
# sort result items.
|
|
3414
|
+
if (len(result.Items) > 0):
|
|
3415
|
+
if (sortResult is True):
|
|
3416
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
3412
3417
|
|
|
3413
3418
|
# trace.
|
|
3414
3419
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -3981,9 +3986,10 @@ class SpotifyClient:
|
|
|
3981
3986
|
result.Total = pageObj.Total
|
|
3982
3987
|
result.CursorAfter = pageObj.CursorAfter
|
|
3983
3988
|
|
|
3984
|
-
# sort items
|
|
3985
|
-
if (len(result.Items) > 0)
|
|
3986
|
-
|
|
3989
|
+
# sort result items.
|
|
3990
|
+
if (len(result.Items) > 0):
|
|
3991
|
+
if (sortResult is True):
|
|
3992
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
3987
3993
|
|
|
3988
3994
|
# trace.
|
|
3989
3995
|
_logsi.LogObject(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -4510,9 +4516,10 @@ class SpotifyClient:
|
|
|
4510
4516
|
# update result object with final paging details.
|
|
4511
4517
|
result.Total = pageObj.Total
|
|
4512
4518
|
|
|
4513
|
-
# sort items
|
|
4514
|
-
if (len(result.Items) > 0)
|
|
4515
|
-
|
|
4519
|
+
# sort result items.
|
|
4520
|
+
if (len(result.Items) > 0):
|
|
4521
|
+
if (sortResult is True):
|
|
4522
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
4516
4523
|
|
|
4517
4524
|
# trace.
|
|
4518
4525
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -4900,9 +4907,10 @@ class SpotifyClient:
|
|
|
4900
4907
|
# update result object with final paging details.
|
|
4901
4908
|
result.Total = pageObj.Total
|
|
4902
4909
|
|
|
4903
|
-
# sort items
|
|
4904
|
-
if (len(result.Items) > 0)
|
|
4905
|
-
|
|
4910
|
+
# sort result items.
|
|
4911
|
+
if (len(result.Items) > 0):
|
|
4912
|
+
if (sortResult is True):
|
|
4913
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
4906
4914
|
|
|
4907
4915
|
# trace.
|
|
4908
4916
|
_logsi.LogObject(SILevel.Verbose, TRACE_METHOD_RESULT_TYPE % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -5182,9 +5190,10 @@ class SpotifyClient:
|
|
|
5182
5190
|
# update result object with final paging details.
|
|
5183
5191
|
result.Total = pageObj.Total
|
|
5184
5192
|
|
|
5185
|
-
# sort items
|
|
5186
|
-
if (len(result.Items) > 0)
|
|
5187
|
-
|
|
5193
|
+
# sort result items.
|
|
5194
|
+
if (len(result.Items) > 0):
|
|
5195
|
+
if (sortResult is True):
|
|
5196
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
5188
5197
|
|
|
5189
5198
|
# trace.
|
|
5190
5199
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -5623,9 +5632,12 @@ class SpotifyClient:
|
|
|
5623
5632
|
# update result object with final paging details.
|
|
5624
5633
|
result.Total = pageObj.Total
|
|
5625
5634
|
|
|
5626
|
-
# sort items
|
|
5627
|
-
if (len(result.Items) > 0)
|
|
5628
|
-
|
|
5635
|
+
# sort result items.
|
|
5636
|
+
if (len(result.Items) > 0):
|
|
5637
|
+
if (sortResult is True):
|
|
5638
|
+
result.Items.sort(key=lambda x: (x.Episode.Name or "").lower(), reverse=False)
|
|
5639
|
+
else:
|
|
5640
|
+
result.Items.sort(key=lambda x: (x.AddedAt or "").lower(), reverse=True)
|
|
5629
5641
|
|
|
5630
5642
|
# trace.
|
|
5631
5643
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -5910,9 +5922,10 @@ class SpotifyClient:
|
|
|
5910
5922
|
# update result object with final paging details.
|
|
5911
5923
|
result.Total = pageObj.Total
|
|
5912
5924
|
|
|
5913
|
-
# sort items
|
|
5914
|
-
if (len(result.Items) > 0)
|
|
5915
|
-
|
|
5925
|
+
# sort result items.
|
|
5926
|
+
if (len(result.Items) > 0):
|
|
5927
|
+
if (sortResult is True):
|
|
5928
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
5916
5929
|
|
|
5917
5930
|
# trace.
|
|
5918
5931
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -7843,9 +7856,10 @@ class SpotifyClient:
|
|
|
7843
7856
|
# update result object with final paging details.
|
|
7844
7857
|
result.Total = pageObj.Total
|
|
7845
7858
|
|
|
7846
|
-
# sort items
|
|
7847
|
-
if (len(result.Items) > 0)
|
|
7848
|
-
|
|
7859
|
+
# sort result items.
|
|
7860
|
+
if (len(result.Items) > 0):
|
|
7861
|
+
if (sortResult is True):
|
|
7862
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
7849
7863
|
|
|
7850
7864
|
# trace.
|
|
7851
7865
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -8001,9 +8015,10 @@ class SpotifyClient:
|
|
|
8001
8015
|
# update result object with final paging details.
|
|
8002
8016
|
result.Total = pageObj.Total
|
|
8003
8017
|
|
|
8004
|
-
# sort items
|
|
8005
|
-
if (len(result.Items) > 0)
|
|
8006
|
-
|
|
8018
|
+
# sort result items.
|
|
8019
|
+
if (len(result.Items) > 0):
|
|
8020
|
+
if (sortResult is True):
|
|
8021
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
8007
8022
|
|
|
8008
8023
|
# trace.
|
|
8009
8024
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -8416,7 +8431,7 @@ class SpotifyClient:
|
|
|
8416
8431
|
else:
|
|
8417
8432
|
|
|
8418
8433
|
# append page of items to final results.
|
|
8419
|
-
item:
|
|
8434
|
+
item:ShowSaved
|
|
8420
8435
|
for item in pageObj.Items:
|
|
8421
8436
|
result.Items.append(item)
|
|
8422
8437
|
result.Limit = result.ItemsCount
|
|
@@ -8430,9 +8445,12 @@ class SpotifyClient:
|
|
|
8430
8445
|
# update result object with final paging details.
|
|
8431
8446
|
result.Total = pageObj.Total
|
|
8432
8447
|
|
|
8433
|
-
# sort items
|
|
8434
|
-
if (len(result.Items) > 0)
|
|
8435
|
-
|
|
8448
|
+
# sort result items.
|
|
8449
|
+
if (len(result.Items) > 0):
|
|
8450
|
+
if (sortResult is True):
|
|
8451
|
+
result.Items.sort(key=lambda x: (x.Show.Name or "").lower(), reverse=False)
|
|
8452
|
+
else:
|
|
8453
|
+
result.Items.sort(key=lambda x: (x.AddedAt or "").lower(), reverse=True)
|
|
8436
8454
|
|
|
8437
8455
|
# trace.
|
|
8438
8456
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -9066,9 +9084,10 @@ class SpotifyClient:
|
|
|
9066
9084
|
# update cache.
|
|
9067
9085
|
self._ConfigurationCache[apiMethodName] = result
|
|
9068
9086
|
|
|
9069
|
-
# sort items
|
|
9070
|
-
if (len(result.Items) > 0)
|
|
9071
|
-
|
|
9087
|
+
# sort result items.
|
|
9088
|
+
if (len(result.Items) > 0):
|
|
9089
|
+
if (sortResult is True):
|
|
9090
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
9072
9091
|
|
|
9073
9092
|
# update last refresh date.
|
|
9074
9093
|
result.DateLastRefreshed = datetime.utcnow().timestamp()
|
|
@@ -9391,9 +9410,12 @@ class SpotifyClient:
|
|
|
9391
9410
|
# update result object with final paging details.
|
|
9392
9411
|
result.Total = pageObj.Total
|
|
9393
9412
|
|
|
9394
|
-
# sort items
|
|
9395
|
-
if (len(result.Items) > 0)
|
|
9396
|
-
|
|
9413
|
+
# sort result items.
|
|
9414
|
+
if (len(result.Items) > 0):
|
|
9415
|
+
if (sortResult is True):
|
|
9416
|
+
result.Items.sort(key=lambda x: (x.Track.Name or "").lower(), reverse=False)
|
|
9417
|
+
else:
|
|
9418
|
+
result.Items.sort(key=lambda x: (x.AddedAt or "").lower(), reverse=True)
|
|
9397
9419
|
|
|
9398
9420
|
# trace.
|
|
9399
9421
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -10314,9 +10336,10 @@ class SpotifyClient:
|
|
|
10314
10336
|
# update result object with final paging details.
|
|
10315
10337
|
result.Total = pageObj.Total
|
|
10316
10338
|
|
|
10317
|
-
# sort items
|
|
10318
|
-
if (len(result.Items) > 0)
|
|
10319
|
-
|
|
10339
|
+
# sort result items.
|
|
10340
|
+
if (len(result.Items) > 0):
|
|
10341
|
+
if (sortResult is True):
|
|
10342
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
10320
10343
|
|
|
10321
10344
|
# trace.
|
|
10322
10345
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -10477,9 +10500,10 @@ class SpotifyClient:
|
|
|
10477
10500
|
# update result object with final paging details.
|
|
10478
10501
|
result.Total = pageObj.Total
|
|
10479
10502
|
|
|
10480
|
-
# sort items
|
|
10481
|
-
if (len(result.Items) > 0)
|
|
10482
|
-
|
|
10503
|
+
# sort result items.
|
|
10504
|
+
if (len(result.Items) > 0):
|
|
10505
|
+
if (sortResult is True):
|
|
10506
|
+
result.Items.sort(key=lambda x: (x.Name or "").lower(), reverse=False)
|
|
10483
10507
|
|
|
10484
10508
|
# trace.
|
|
10485
10509
|
_logsi.LogObject(SILevel.Verbose, (TRACE_METHOD_RESULT_TYPE + result.PagingInfo) % (apiMethodName, type(result).__name__), result, excludeNonPublic=True)
|
|
@@ -492,6 +492,11 @@ class ZeroconfGetInfo(ZeroconfResponse):
|
|
|
492
492
|
'TokenType': self._TokenType,
|
|
493
493
|
'Version': self._Version,
|
|
494
494
|
'VoiceSupport': self._VoiceSupport,
|
|
495
|
+
# helper property(s), not part of the Spotify Web API interface:
|
|
496
|
+
'HasActiveUser': self.HasActiveUser,
|
|
497
|
+
'HasAliases': self.HasAliases,
|
|
498
|
+
'IsAvailable': self.IsAvailable,
|
|
499
|
+
'IsBrandSonos': self.IsBrandSonos,
|
|
495
500
|
'IsActiveDevice': self._IsActiveDevice,
|
|
496
501
|
'IsInDeviceList': self._IsInDeviceList,
|
|
497
502
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|