spotifywebapiPython 1.0.270__py3-none-any.whl → 1.0.272__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.
- 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 +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/spotifymediatypes.html +2 -2
- spotifywebapipython/docs/spotifywebapipython/spotifytypeprefixes.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/models/userprofilesimplified.py +27 -0
- spotifywebapipython/spotifyclient.py +39 -32
- {spotifywebapipython-1.0.270.dist-info → spotifywebapipython-1.0.272.dist-info}/METADATA +1 -1
- {spotifywebapipython-1.0.270.dist-info → spotifywebapipython-1.0.272.dist-info}/RECORD +24 -24
- {spotifywebapipython-1.0.270.dist-info → spotifywebapipython-1.0.272.dist-info}/LICENSE +0 -0
- {spotifywebapipython-1.0.270.dist-info → spotifywebapipython-1.0.272.dist-info}/WHEEL +0 -0
- {spotifywebapipython-1.0.270.dist-info → spotifywebapipython-1.0.272.dist-info}/top_level.txt +0 -0
|
@@ -224,6 +224,7 @@ class SpotifyClient:
|
|
|
224
224
|
self._AuthClient:AuthClient = None
|
|
225
225
|
self._ConfigurationCache:dict = {}
|
|
226
226
|
self._ConfigurationDataPath:str = None
|
|
227
|
+
self._ConfigurationData_RLock:threading.RLock = threading.RLock()
|
|
227
228
|
self._DefaultDeviceId:str = None
|
|
228
229
|
self._HasSpotifyWebPlayerCredentials:bool = False
|
|
229
230
|
self._IsDisposed:bool = False
|
|
@@ -964,27 +965,30 @@ class SpotifyClient:
|
|
|
964
965
|
_logsi.LogVerbose("Config data storage key: \"%s\"" % (dataKey))
|
|
965
966
|
_logsi.LogVerbose("Config data storage file path: \"%s\"" % (self._ConfigurationDataPath))
|
|
966
967
|
|
|
967
|
-
#
|
|
968
|
-
|
|
968
|
+
# make the following thread-safe, so we don't read / write the config at the same time.
|
|
969
|
+
with self._ConfigurationData_RLock:
|
|
969
970
|
|
|
970
|
-
#
|
|
971
|
-
|
|
972
|
-
|
|
971
|
+
# does the config data file exist?
|
|
972
|
+
if os.path.exists(self._ConfigurationDataPath):
|
|
973
|
+
|
|
974
|
+
# open the config data storage file, and load it's contents.
|
|
975
|
+
_logsi.LogVerbose("Opening config data storage file")
|
|
976
|
+
with open(self._ConfigurationDataPath, 'r') as f:
|
|
973
977
|
|
|
974
|
-
|
|
978
|
+
dataKeys = json.load(f)
|
|
975
979
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
980
|
+
# if config data key exists then return its data; otherwise, return the default.
|
|
981
|
+
if dataKey in dataKeys:
|
|
982
|
+
_logsi.LogDictionary(SILevel.Verbose, "Data was loaded from config data storage file for key: \"%s\"" % (dataKey), dataKeys[dataKey], prettyPrint=True)
|
|
983
|
+
return dataKeys[dataKey]
|
|
984
|
+
else:
|
|
985
|
+
_logsi.LogVerbose("DataKey was not found in config data storage file for key: \"%s\"" % (dataKey))
|
|
986
|
+
return defaultValue
|
|
983
987
|
|
|
984
|
-
|
|
988
|
+
else:
|
|
985
989
|
|
|
986
|
-
|
|
987
|
-
|
|
990
|
+
_logsi.LogVerbose("Config data storage file was not found: \"%s\"" % (self._ConfigurationDataPath))
|
|
991
|
+
return defaultValue
|
|
988
992
|
|
|
989
993
|
except Exception as ex:
|
|
990
994
|
|
|
@@ -1027,26 +1031,29 @@ class SpotifyClient:
|
|
|
1027
1031
|
else:
|
|
1028
1032
|
_logsi.LogValue(SILevel.Verbose, "Config data storage value (non-dict)", dataValue)
|
|
1029
1033
|
|
|
1030
|
-
|
|
1034
|
+
# make the following thread-safe, so we don't read / write the config at the same time.
|
|
1035
|
+
with self._ConfigurationData_RLock:
|
|
1036
|
+
|
|
1037
|
+
dataKeys:dict = {}
|
|
1031
1038
|
|
|
1032
|
-
|
|
1033
|
-
|
|
1039
|
+
# does the config data storage file exist?
|
|
1040
|
+
if os.path.exists(self._ConfigurationDataPath):
|
|
1034
1041
|
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1042
|
+
# open the config data storage file, and load it's contents.
|
|
1043
|
+
#_logsi.LogVerbose("Loading config data storage file contents")
|
|
1044
|
+
with open(self._ConfigurationDataPath, 'r') as f:
|
|
1045
|
+
dataKeys = json.load(f)
|
|
1039
1046
|
|
|
1040
|
-
|
|
1047
|
+
if dataValue is not None:
|
|
1041
1048
|
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1049
|
+
# store the config data for the key.
|
|
1050
|
+
#_logsi.LogVerbose("Updating config key value in config data storage")
|
|
1051
|
+
dataKeys[dataKey] = dataValue
|
|
1052
|
+
|
|
1053
|
+
# save the config data storage file changes.
|
|
1054
|
+
_logsi.LogVerbose("Saving config key data to disk: \"%s\"" % (dataKey))
|
|
1055
|
+
with open(self._ConfigurationDataPath, 'w') as f:
|
|
1056
|
+
json.dump(dataKeys, f, indent=4, sort_keys=True)
|
|
1050
1057
|
|
|
1051
1058
|
except Exception as ex:
|
|
1052
1059
|
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
spotifywebapipython/__init__.py,sha256=ka7F2AsT-UU7KSYKBnfgl5Trojcep5aQspLutg8D-2k,1306
|
|
2
|
-
spotifywebapipython/const.py,sha256=
|
|
2
|
+
spotifywebapipython/const.py,sha256=WZA8rxewplKuh-HjEakVq1_LR6iqWkYY3YcTmRT1bSc,4100
|
|
3
3
|
spotifywebapipython/saappmessages.py,sha256=mVprjpd5CdD8kYeAkLzRvMvIQPmaYtH4UCP5my3QhSk,5065
|
|
4
4
|
spotifywebapipython/sautils.py,sha256=j3f_Lu3Tb5D7-Gd2rJ2Ep901W-4XDp6Vq6XXVl8DX5I,8098
|
|
5
5
|
spotifywebapipython/spotifyapierror.py,sha256=23_CYlxWN0BceYYCLpBpunl55vEwPr_wFf34l74xzeA,1855
|
|
6
6
|
spotifywebapipython/spotifyapimessage.py,sha256=wCnW8jYMLS3x9kjyXPgXXZqaf1HeMTTXzU8u_Dm5pfA,8447
|
|
7
7
|
spotifywebapipython/spotifyauthtoken.py,sha256=iVg2Pa5mfMqYe4qgc5H8td6JzJlaDqk4vMEhH5LmtfI,9289
|
|
8
|
-
spotifywebapipython/spotifyclient.py,sha256=
|
|
8
|
+
spotifywebapipython/spotifyclient.py,sha256=5F1so7SdO8iYVl45El7GxK2r55dtJMlurHZmHXLQgmc,901035
|
|
9
9
|
spotifywebapipython/spotifydiscovery.py,sha256=cyysxl8PQj9yGHVbaqhSF3SStlrp-NvfGAudM-dDmg0,20290
|
|
10
10
|
spotifywebapipython/spotifymediatypes.py,sha256=hMjkxhbfTtks0_P8BKmY7qg3EmB2zhH3RT0DbEpb_2s,1628
|
|
11
11
|
spotifywebapipython/spotifytypeprefixes.py,sha256=3yfpxKF7jF694qBuo-PbKYvm70YwwdBoGj9enOpWsAg,1375
|
|
12
12
|
spotifywebapipython/spotifywebapiauthenticationerror.py,sha256=5A0MKvYo3Ypv0ZeSSfLHuFLwzoUUu044bBoUgMfNXNw,3940
|
|
13
13
|
spotifywebapipython/spotifywebapierror.py,sha256=5cga9213J_nFQ0UX4vSn3dpyinASKTRiH0wAR4nLjvs,3147
|
|
14
14
|
spotifywebapipython/spotifywebplayertoken.py,sha256=axj1j1lM7COiiZfpElkJRdnk4AmE6bAQcjKshUIz1Nk,35813
|
|
15
|
-
spotifywebapipython/docs/__init__.html,sha256=
|
|
15
|
+
spotifywebapipython/docs/__init__.html,sha256=GVxMumebREOs_BmNA_f0xcq9eTg0LohAkK5DJLWIgas,189422
|
|
16
16
|
spotifywebapipython/docs/codecopy.js,sha256=ryuoZwLIL03YitjjFzn49UO5ta7-OBos6LNA3qHhFzs,3120
|
|
17
|
-
spotifywebapipython/docs/index.html,sha256=
|
|
18
|
-
spotifywebapipython/docs/search.js,sha256
|
|
17
|
+
spotifywebapipython/docs/index.html,sha256=ciujivOcMhUPJ6Yb4h1Z4lGug7m_aSbpX67mjgphHJk,48779
|
|
18
|
+
spotifywebapipython/docs/search.js,sha256=--cjJyL1bkQr6FQOD1hOOzUiCPhheumVlC3vdsFO_Tg,9152041
|
|
19
19
|
spotifywebapipython/docs/spotifywebapipython.ico,sha256=YImj39fqqSPSuB2-sMDlUYDd6YwRfQeJRtq4FjwWglg,16410
|
|
20
20
|
spotifywebapipython/docs/spotifywebapipython_OLD.ico,sha256=YIv5LjcD4bTIJQSOr8jjwbWaeB3QkElRwkTOePiGbZo,14904
|
|
21
|
-
spotifywebapipython/docs/spotifywebapipython/const.html,sha256=
|
|
22
|
-
spotifywebapipython/docs/spotifywebapipython/saappmessages.html,sha256=
|
|
23
|
-
spotifywebapipython/docs/spotifywebapipython/sautils.html,sha256=
|
|
24
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html,sha256
|
|
25
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html,sha256=
|
|
26
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html,sha256=
|
|
27
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyclient.html,sha256=
|
|
28
|
-
spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html,sha256=
|
|
29
|
-
spotifywebapipython/docs/spotifywebapipython/spotifymediatypes.html,sha256=
|
|
30
|
-
spotifywebapipython/docs/spotifywebapipython/spotifytypeprefixes.html,sha256=
|
|
31
|
-
spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html,sha256=
|
|
32
|
-
spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html,sha256=
|
|
33
|
-
spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html,sha256=
|
|
21
|
+
spotifywebapipython/docs/spotifywebapipython/const.html,sha256=gCwNj2EJ-4erzH-GrwcAxp5LpvNrdD_MW0wGZEYkzeQ,60537
|
|
22
|
+
spotifywebapipython/docs/spotifywebapipython/saappmessages.html,sha256=I75CYrQ-Fq67txqnNGsha25PgNBEgt-z3WDSuuZpLe0,62358
|
|
23
|
+
spotifywebapipython/docs/spotifywebapipython/sautils.html,sha256=0_GuZm6TdrgmvFA0Wy1zP9GpF2v8AWFBysEJIZ_PET0,61063
|
|
24
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html,sha256=dtPTGF7PJ6KccNbcnTOm_OpJb5lpEH3GHsKY55lEXN8,48054
|
|
25
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html,sha256=6TT9ZntT9oRSK2vsOKMLP7qRNXPfW86siDmXMJYvPAQ,59210
|
|
26
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html,sha256=45HuryBruliLqFj6hHjz2n0Np-bjB8oM4c9YI0eLYwY,59256
|
|
27
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyclient.html,sha256=u4_WRZhN6WVDwoOn0T5vhUFHUgl68kcZmyosLsyFFFs,1667177
|
|
28
|
+
spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html,sha256=KPy_qcSzcca2hxmod3tSXxHbqLP9Z_uEhvoKSo4q8Lg,57662
|
|
29
|
+
spotifywebapipython/docs/spotifywebapipython/spotifymediatypes.html,sha256=issa5jbamq3oNC2nKFxPmdKMdDmJ2vIRWFMN6AxDzrs,51532
|
|
30
|
+
spotifywebapipython/docs/spotifywebapipython/spotifytypeprefixes.html,sha256=bGT2D3elQPocyOLiRESvcl5unUp0n5Ib4oLy7M_UzK8,52401
|
|
31
|
+
spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html,sha256=39S8esqBY_PY392-9rA0D5qIj_kUvuGf_dWT6Hc_IGc,52174
|
|
32
|
+
spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html,sha256=oXpP1Yg-IxQX0GU75GbzEgrVaS2-_rBKTJiaFeE37To,50592
|
|
33
|
+
spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html,sha256=kaZbtHeQeg03U4iBl_fTOw0NhOj6c32NctVPNnC5WCc,62204
|
|
34
34
|
spotifywebapipython/models/__init__.py,sha256=RwRQhUX-6EUs8XvStVFpR8EPwoqIAz9K6ref-28qHKI,4423
|
|
35
35
|
spotifywebapipython/models/album.py,sha256=U3Pdw0-EL33LdkeiN31fjZ23rlLk6DNGV8jRmZU7EyQ,5170
|
|
36
36
|
spotifywebapipython/models/albumpagesaved.py,sha256=SBYMhkh5ZsMrRAXl-cm9zsxMDh8gO190ENq6Py2TyGY,2417
|
|
@@ -103,7 +103,7 @@ spotifywebapipython/models/trackrecommendations.py,sha256=D-CJRxOoX5jGKkxthjg5Zc
|
|
|
103
103
|
spotifywebapipython/models/tracksaved.py,sha256=uwnTpawf7ymXlF_b4p1RyjonUwUFRp0q_y_kuSP6Vfs,2725
|
|
104
104
|
spotifywebapipython/models/tracksimplified.py,sha256=fqIH45BsTRPbwq0ytss3r9YTCn1TtJSwBLAelJ2dWJY,13199
|
|
105
105
|
spotifywebapipython/models/userprofile.py,sha256=VXHP-wSWGSIiDebGDuT4fFNBCmx_ME6Hn1NO5QyyBQY,6482
|
|
106
|
-
spotifywebapipython/models/userprofilesimplified.py,sha256=
|
|
106
|
+
spotifywebapipython/models/userprofilesimplified.py,sha256=qd1CVNwlt7J-M4tmUVaCQ8DON-Mz7z6UAQmXa7D_ZqM,7870
|
|
107
107
|
spotifywebapipython/models/zeroconfdiscoveryresult.py,sha256=XID2qmaK2WTGJoLTQ54aQjfutLJMLgJ7A1ATwAp06kY,20250
|
|
108
108
|
spotifywebapipython/models/zeroconfproperty.py,sha256=sXGUqbHhFMutCNKFJwJKbNbbQAnBnR7Ob5wNDSePxZk,2141
|
|
109
109
|
spotifywebapipython/oauthcli/__init__.py,sha256=K37XTxYAKT0n8otCNzWbjgJ10fAPN4WL6seEpwvWyo4,168
|
|
@@ -137,8 +137,8 @@ spotifywebapipython/zeroconfapi/zeroconfgetinfo.py,sha256=APayso_F7lCsdzzrkescgd
|
|
|
137
137
|
spotifywebapipython/zeroconfapi/zeroconfgetinfoalias.py,sha256=FZJM23HIPJSfhXIC3-EuS1XhawheoG5maSp7__k4yBo,2932
|
|
138
138
|
spotifywebapipython/zeroconfapi/zeroconfgetinfodrmmediaformat.py,sha256=c5uk8ljsIuBK3w2jahHKQuoWvm245LOjUBitetXx5Mo,2347
|
|
139
139
|
spotifywebapipython/zeroconfapi/zeroconfresponse.py,sha256=mAPIDj5MG53x8peiScrp7OJblwy_o_Sto4wqE0rGujU,6445
|
|
140
|
-
spotifywebapipython-1.0.
|
|
141
|
-
spotifywebapipython-1.0.
|
|
142
|
-
spotifywebapipython-1.0.
|
|
143
|
-
spotifywebapipython-1.0.
|
|
144
|
-
spotifywebapipython-1.0.
|
|
140
|
+
spotifywebapipython-1.0.272.dist-info/LICENSE,sha256=KGcc9g0zwqNLcWnSn_ezv1UtKyhMENFhvtixpxUPNsE,1177
|
|
141
|
+
spotifywebapipython-1.0.272.dist-info/METADATA,sha256=4H-l70kFVeVfNzAt9MtiqFwQUdHrxvpgEm6w9XLhITg,11644
|
|
142
|
+
spotifywebapipython-1.0.272.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
143
|
+
spotifywebapipython-1.0.272.dist-info/top_level.txt,sha256=jTBLFlijKTesYh2dteAz4vb17qjaqWKeDjpnnwTcrjs,20
|
|
144
|
+
spotifywebapipython-1.0.272.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{spotifywebapipython-1.0.270.dist-info → spotifywebapipython-1.0.272.dist-info}/top_level.txt
RENAMED
|
File without changes
|