spotifywebapiPython 1.0.243__py3-none-any.whl → 1.0.244__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 +9 -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/docs/spotifywebapipython/spotifywebplayertoken.html +2 -2
- spotifywebapipython/spotifyconnect/spotifyconnectdirectorytask.py +228 -76
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastcontroller.py +2 -2
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastmultizonecontrollerlistener.py +247 -0
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastmultizonemanagerlistener.py +384 -0
- {spotifywebapipython-1.0.243.dist-info → spotifywebapipython-1.0.244.dist-info}/METADATA +1 -1
- {spotifywebapipython-1.0.243.dist-info → spotifywebapipython-1.0.244.dist-info}/RECORD +24 -23
- spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastmultizonelistener.py +0 -212
- {spotifywebapipython-1.0.243.dist-info → spotifywebapipython-1.0.244.dist-info}/LICENSE +0 -0
- {spotifywebapipython-1.0.243.dist-info → spotifywebapipython-1.0.244.dist-info}/WHEEL +0 -0
- {spotifywebapipython-1.0.243.dist-info → spotifywebapipython-1.0.244.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
spotifywebapipython/__init__.py,sha256=SnB5BsUGChYgcZHjhZenqYZkb_v3c8aiAUQLkp4lYSY,1205
|
|
2
|
-
spotifywebapipython/const.py,sha256=
|
|
2
|
+
spotifywebapipython/const.py,sha256=As5EZGbWSAsTBWBV0tcPpAe4IGtI8MLqmk1QF-64_lA,3739
|
|
3
3
|
spotifywebapipython/saappmessages.py,sha256=KWy4H0ePYARZgtGYc2CHXRY0JOQ0bqr0JuDKRBu-wjA,4645
|
|
4
4
|
spotifywebapipython/sautils.py,sha256=j3f_Lu3Tb5D7-Gd2rJ2Ep901W-4XDp6Vq6XXVl8DX5I,8098
|
|
5
5
|
spotifywebapipython/spotifyapierror.py,sha256=23_CYlxWN0BceYYCLpBpunl55vEwPr_wFf34l74xzeA,1855
|
|
@@ -11,23 +11,23 @@ spotifywebapipython/spotifymediatypes.py,sha256=hxpBTBb6YRkRxy4rneinLhGugzfw7NTn
|
|
|
11
11
|
spotifywebapipython/spotifywebapiauthenticationerror.py,sha256=5A0MKvYo3Ypv0ZeSSfLHuFLwzoUUu044bBoUgMfNXNw,3940
|
|
12
12
|
spotifywebapipython/spotifywebapierror.py,sha256=5cga9213J_nFQ0UX4vSn3dpyinASKTRiH0wAR4nLjvs,3147
|
|
13
13
|
spotifywebapipython/spotifywebplayertoken.py,sha256=axj1j1lM7COiiZfpElkJRdnk4AmE6bAQcjKshUIz1Nk,35813
|
|
14
|
-
spotifywebapipython/docs/__init__.html,sha256=
|
|
14
|
+
spotifywebapipython/docs/__init__.html,sha256=ZQPBcyyjHGb-hjCyZZBZ9l2yHRjAcdpEwpmiKeSklBU,177055
|
|
15
15
|
spotifywebapipython/docs/codecopy.js,sha256=ryuoZwLIL03YitjjFzn49UO5ta7-OBos6LNA3qHhFzs,3120
|
|
16
|
-
spotifywebapipython/docs/index.html,sha256=
|
|
17
|
-
spotifywebapipython/docs/search.js,sha256=
|
|
16
|
+
spotifywebapipython/docs/index.html,sha256=rMOtw1jjEQ5T486FMekl69Wc5HJzBgr1bwyTLk5OB60,48381
|
|
17
|
+
spotifywebapipython/docs/search.js,sha256=lgsTSoLdC1fyB0eVI2YgHibwzZ0UlryZhMFLrFXFcRw,8842992
|
|
18
18
|
spotifywebapipython/docs/spotifywebapipython.ico,sha256=YImj39fqqSPSuB2-sMDlUYDd6YwRfQeJRtq4FjwWglg,16410
|
|
19
19
|
spotifywebapipython/docs/spotifywebapipython_OLD.ico,sha256=YIv5LjcD4bTIJQSOr8jjwbWaeB3QkElRwkTOePiGbZo,14904
|
|
20
|
-
spotifywebapipython/docs/spotifywebapipython/const.html,sha256=
|
|
21
|
-
spotifywebapipython/docs/spotifywebapipython/saappmessages.html,sha256=
|
|
22
|
-
spotifywebapipython/docs/spotifywebapipython/sautils.html,sha256=
|
|
23
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html,sha256=
|
|
24
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html,sha256=
|
|
25
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html,sha256=
|
|
26
|
-
spotifywebapipython/docs/spotifywebapipython/spotifyclient.html,sha256=
|
|
27
|
-
spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html,sha256=
|
|
28
|
-
spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html,sha256=
|
|
29
|
-
spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html,sha256=
|
|
30
|
-
spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html,sha256=
|
|
20
|
+
spotifywebapipython/docs/spotifywebapipython/const.html,sha256=lYSNtdJ8XaN2WH1wclaotPXh2gV2F2nBZbNhw0MLrg0,59034
|
|
21
|
+
spotifywebapipython/docs/spotifywebapipython/saappmessages.html,sha256=_VXzg5Ms5bGJIpqdZOpE7oJcgDujNEidHL2xgODC-dc,60895
|
|
22
|
+
spotifywebapipython/docs/spotifywebapipython/sautils.html,sha256=jVF9AiT6vHIWLa7lkO18STfdWOg1EV4WlH-zkCik7T0,61063
|
|
23
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyapierror.html,sha256=jJc482z0q_fLeTLCXxxp6iMytnMCZW3VnlrD2vJRrOA,48054
|
|
24
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyapimessage.html,sha256=cooRFPVkDQ_oQ1NE9DzbF7wQq3QJJpVqZzYjG1HqHxM,59210
|
|
25
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyauthtoken.html,sha256=FxWyjHB3-mePl8eb0etE1Jv3IiuKUQxquCfkrvjfaC8,59256
|
|
26
|
+
spotifywebapipython/docs/spotifywebapipython/spotifyclient.html,sha256=fMnGTGR8dRftwJ_3wp7KMoNIWKkSZ-VTsCOIF57EjH8,1608302
|
|
27
|
+
spotifywebapipython/docs/spotifywebapipython/spotifydiscovery.html,sha256=2_ZYE-KNhqIVbhvRP39o_PeqNDdV3rwIkSxAsODz_ac,57662
|
|
28
|
+
spotifywebapipython/docs/spotifywebapipython/spotifywebapiauthenticationerror.html,sha256=8X2Yuw4Pw41y6Af5P1XmOTzz5fmKvHUvuIzJEw2-SKU,52174
|
|
29
|
+
spotifywebapipython/docs/spotifywebapipython/spotifywebapierror.html,sha256=8Pvxi5AzZ8f5aDJIomfsVLuQ5Cr1qNMvZ1GRgpkdPLU,50592
|
|
30
|
+
spotifywebapipython/docs/spotifywebapipython/spotifywebplayertoken.html,sha256=nY6Tx6kqwfnfBJCVFbJW7pBr1mdd-GccHBsK0rGCPpY,62204
|
|
31
31
|
spotifywebapipython/models/__init__.py,sha256=UqUPpqOziZuHSJDJXCbgBeICWCFybGqv7uuuN0hvW2E,4344
|
|
32
32
|
spotifywebapipython/models/album.py,sha256=U3Pdw0-EL33LdkeiN31fjZ23rlLk6DNGV8jRmZU7EyQ,5170
|
|
33
33
|
spotifywebapipython/models/albumpagesaved.py,sha256=SBYMhkh5ZsMrRAXl-cm9zsxMDh8gO190ENq6Py2TyGY,2417
|
|
@@ -106,11 +106,12 @@ spotifywebapipython/oauthcli/__init__.py,sha256=K37XTxYAKT0n8otCNzWbjgJ10fAPN4WL
|
|
|
106
106
|
spotifywebapipython/oauthcli/authclient.py,sha256=sGnhMFCPaW4KTgeBgHTUhJR3Did-LlR5wTg1uQ4_rT4,54654
|
|
107
107
|
spotifywebapipython/spotifyconnect/__init__.py,sha256=9Xl5KiJFvWLbsdb4YQ0xmF67i36ybpXCCXrWeNsKEvc,1108
|
|
108
108
|
spotifywebapipython/spotifyconnect/spotifyconnectdeviceeventargs.py,sha256=35hKa0FAaPgy7W8D6MFXmga667pjwXITo8jSj1TDfE8,1988
|
|
109
|
-
spotifywebapipython/spotifyconnect/spotifyconnectdirectorytask.py,sha256=
|
|
109
|
+
spotifywebapipython/spotifyconnect/spotifyconnectdirectorytask.py,sha256=5RzdPku2B-gpZSPNG8rFb3X8vBhxzLi9pycoxV_dIkM,149180
|
|
110
110
|
spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastapptask.py,sha256=lCALM8X980_pKM4L7k8NaXKXEABd4FuhHyMMB9nLerg,22225
|
|
111
|
-
spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastcontroller.py,sha256=
|
|
111
|
+
spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastcontroller.py,sha256=mQ7wyrq6f76vpcebudYKv3aFW9YYBIY3C0CGGFSR4yU,32490
|
|
112
112
|
spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastlistener.py,sha256=DCSPmbKPUqKlKpSMvujWBHHKbntXT7_9QkKBgymuTOs,15928
|
|
113
|
-
spotifywebapipython/spotifyconnect/
|
|
113
|
+
spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastmultizonecontrollerlistener.py,sha256=AA-XxS6AptJWzyO2zsM9DA5ioCncJBKDTpJkr_aN9IM,12352
|
|
114
|
+
spotifywebapipython/spotifyconnect/spotifyconnectzeroconfcastmultizonemanagerlistener.py,sha256=k3wMC80Z7jBXYwiw9jq-oixRsum7E_vdHzwEgvcGbiw,18918
|
|
114
115
|
spotifywebapipython/spotifyconnect/spotifyconnectzeroconfexceptions.py,sha256=aesGauxMoKupdTPR5rL2-rXBC3SEvH_9bQQx2Vh-abs,524
|
|
115
116
|
spotifywebapipython/spotifyconnect/spotifyconnectzeroconflistener.py,sha256=JJovru9o_ie_i9eYb-eZJlPjM-0TQmqU-q3n9F0U-AE,14561
|
|
116
117
|
spotifywebapipython/vibrant/__init__.py,sha256=3O_xwJ59vgxxm7ztGe49Kl4F81nP5aoflDlgQpxjhQA,645
|
|
@@ -131,8 +132,8 @@ spotifywebapipython/zeroconfapi/zeroconfgetinfo.py,sha256=APayso_F7lCsdzzrkescgd
|
|
|
131
132
|
spotifywebapipython/zeroconfapi/zeroconfgetinfoalias.py,sha256=FZJM23HIPJSfhXIC3-EuS1XhawheoG5maSp7__k4yBo,2932
|
|
132
133
|
spotifywebapipython/zeroconfapi/zeroconfgetinfodrmmediaformat.py,sha256=c5uk8ljsIuBK3w2jahHKQuoWvm245LOjUBitetXx5Mo,2347
|
|
133
134
|
spotifywebapipython/zeroconfapi/zeroconfresponse.py,sha256=mAPIDj5MG53x8peiScrp7OJblwy_o_Sto4wqE0rGujU,6445
|
|
134
|
-
spotifywebapipython-1.0.
|
|
135
|
-
spotifywebapipython-1.0.
|
|
136
|
-
spotifywebapipython-1.0.
|
|
137
|
-
spotifywebapipython-1.0.
|
|
138
|
-
spotifywebapipython-1.0.
|
|
135
|
+
spotifywebapipython-1.0.244.dist-info/LICENSE,sha256=KGcc9g0zwqNLcWnSn_ezv1UtKyhMENFhvtixpxUPNsE,1177
|
|
136
|
+
spotifywebapipython-1.0.244.dist-info/METADATA,sha256=GLA2s0SY0277xUCLaUeO7AbVOtQ9p7x4Bs4G_VredRM,11613
|
|
137
|
+
spotifywebapipython-1.0.244.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
138
|
+
spotifywebapipython-1.0.244.dist-info/top_level.txt,sha256=jTBLFlijKTesYh2dteAz4vb17qjaqWKeDjpnnwTcrjs,20
|
|
139
|
+
spotifywebapipython-1.0.244.dist-info/RECORD,,
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
# external package imports.
|
|
2
|
-
from pychromecast.controllers.multizone import MultizoneController, MultiZoneControllerListener
|
|
3
|
-
from pychromecast.dial import MultizoneStatus, get_multizone_status
|
|
4
|
-
from pychromecast import Chromecast
|
|
5
|
-
import pychromecast
|
|
6
|
-
import threading
|
|
7
|
-
from uuid import UUID
|
|
8
|
-
from zeroconf import Zeroconf
|
|
9
|
-
|
|
10
|
-
# our package imports.
|
|
11
|
-
from spotifywebapipython.models import SpotifyConnectDevice, ZeroconfDiscoveryResult
|
|
12
|
-
# note - cannot reference `SpotifyConnectDirectoryTask` due to circular import!
|
|
13
|
-
# from .spotifyconnectdirectorytask import SpotifyConnectDirectoryTask
|
|
14
|
-
|
|
15
|
-
# get smartinspect logger reference; create a new session for this module name.
|
|
16
|
-
from smartinspectpython.siauto import SIAuto, SILevel, SISession, SIMethodParmListContext, SIColors
|
|
17
|
-
import logging
|
|
18
|
-
|
|
19
|
-
_logsi:SISession = SIAuto.Si.GetSession(__name__)
|
|
20
|
-
if (_logsi == None):
|
|
21
|
-
_logsi = SIAuto.Si.AddSession(__name__, True)
|
|
22
|
-
_logsi.SystemLogger = logging.getLogger(__name__)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class SpotifyConnectZeroconfCastMultiZoneListener(MultiZoneControllerListener):
|
|
26
|
-
"""
|
|
27
|
-
Google Chromecast Zeroconf MultiZone Listener class.
|
|
28
|
-
|
|
29
|
-
Listens for Chromecast device multi-zone status updates for devices that
|
|
30
|
-
support multi-zone / group functionality.
|
|
31
|
-
"""
|
|
32
|
-
|
|
33
|
-
def __init__(
|
|
34
|
-
self,
|
|
35
|
-
parentDirectory,
|
|
36
|
-
zeroconfInstance:Zeroconf,
|
|
37
|
-
zeroconf_RLock:threading.RLock,
|
|
38
|
-
castMultizoneController:MultizoneController,
|
|
39
|
-
castDevice:Chromecast,
|
|
40
|
-
) -> None:
|
|
41
|
-
"""
|
|
42
|
-
Initializes a new instance of the class.
|
|
43
|
-
|
|
44
|
-
Args:
|
|
45
|
-
parentDirectory (SpotifyConnectDirectoryTask):
|
|
46
|
-
Parent SpotifyConnectDirectoryTask instance.
|
|
47
|
-
zeroconfInstance (Zeroconf):
|
|
48
|
-
Zeroconf instance used to query zeroconf.
|
|
49
|
-
zeroconf_RLock (threading.RLock):
|
|
50
|
-
Lock object used to enforce thread-safe updates.
|
|
51
|
-
castMultizoneController (MultizoneController)
|
|
52
|
-
MultizoneController parent instance.
|
|
53
|
-
castDevice (Chromecast):
|
|
54
|
-
Chromecast device object.
|
|
55
|
-
"""
|
|
56
|
-
# invoke base class method.
|
|
57
|
-
super().__init__()
|
|
58
|
-
|
|
59
|
-
# initialize storage.
|
|
60
|
-
self._CastMultizoneController:MultizoneController = castMultizoneController
|
|
61
|
-
self._CastDevice = castDevice
|
|
62
|
-
self._ParentDirectory = parentDirectory
|
|
63
|
-
self._ZeroconfInstance:Zeroconf = zeroconfInstance
|
|
64
|
-
self._Zeroconf_RLock:threading.RLock = zeroconf_RLock
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def multizone_member_added(
|
|
68
|
-
self,
|
|
69
|
-
group_uuid:str,
|
|
70
|
-
) -> None:
|
|
71
|
-
"""
|
|
72
|
-
Called when cast has been added to group identified by group_uuid.
|
|
73
|
-
"""
|
|
74
|
-
# use lock, as multiple threads could be calling this method simultaneously.
|
|
75
|
-
with self._Zeroconf_RLock:
|
|
76
|
-
|
|
77
|
-
# copy passed parameters to thread-safe storage.
|
|
78
|
-
argsGroupUuid:UUID = group_uuid
|
|
79
|
-
|
|
80
|
-
apiMethodName:str = "multizone_member_added"
|
|
81
|
-
apiMethodParms:SIMethodParmListContext = None
|
|
82
|
-
|
|
83
|
-
try:
|
|
84
|
-
|
|
85
|
-
# trace.
|
|
86
|
-
apiMethodParms = _logsi.EnterMethodParmList(SILevel.Debug, apiMethodName)
|
|
87
|
-
apiMethodParms.AppendKeyValue("group_uuid", argsGroupUuid)
|
|
88
|
-
_logsi.LogMethodParmList(SILevel.Debug, "Chromecast multizone group notification was received for group \"%s\"" % (argsGroupUuid), apiMethodParms, colorValue=SIColors.Lavender)
|
|
89
|
-
|
|
90
|
-
# get device instance.
|
|
91
|
-
scDevice:SpotifyConnectDevice = self._ParentDirectory._SpotifyConnectDevices.GetDeviceByDiscoveryKey(str(argsGroupUuid))
|
|
92
|
-
if (scDevice is None):
|
|
93
|
-
|
|
94
|
-
# trace.
|
|
95
|
-
_logsi.LogVerbose("Could not find SpotifyConnectDevices instance for Cast Group discovery key: \"%s\"" % (str(argsGroupUuid)), colorValue=SIColors.Lavender)
|
|
96
|
-
|
|
97
|
-
else:
|
|
98
|
-
|
|
99
|
-
# trace.
|
|
100
|
-
_logsi.LogVerbose("Chromecast member device %s was added to multizone group \"%s\"" % (scDevice.Title, self._CastDevice.cast_info.friendly_name), colorValue=SIColors.Lavender)
|
|
101
|
-
|
|
102
|
-
# dump the multizone status for the newly added member.
|
|
103
|
-
castMultiZoneStatus:MultizoneStatus = get_multizone_status(scDevice.DiscoveryResult.HostIpAddress, self._CastDevice.cast_info.services, self._ZeroconfInstance, 5)
|
|
104
|
-
_logsi.LogObject(SILevel.Verbose, "Chromecast member device multizone status: %s [%s] (get_multizone_status)" % (scDevice.Title, scDevice.DiscoveryResult.HostIpTitle), castMultiZoneStatus, colorValue=SIColors.Lavender)
|
|
105
|
-
|
|
106
|
-
except Exception as ex:
|
|
107
|
-
|
|
108
|
-
# trace.
|
|
109
|
-
_logsi.LogException("Unhandled exception occured while processing Chromecast MultiZoneController notification (%s)" % (apiMethodName), ex, logToSystemLogger=False)
|
|
110
|
-
|
|
111
|
-
# ignore exception, as nothing can be done about it.
|
|
112
|
-
|
|
113
|
-
finally:
|
|
114
|
-
|
|
115
|
-
# trace.
|
|
116
|
-
_logsi.LeaveMethod(SILevel.Debug, apiMethodName)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
def multizone_member_removed(
|
|
120
|
-
self,
|
|
121
|
-
group_uuid,
|
|
122
|
-
) -> None:
|
|
123
|
-
"""
|
|
124
|
-
Called when cast has been removed from group identified by group_uuid.
|
|
125
|
-
"""
|
|
126
|
-
# use lock, as multiple threads could be calling this method simultaneously.
|
|
127
|
-
with self._Zeroconf_RLock:
|
|
128
|
-
|
|
129
|
-
# copy passed parameters to thread-safe storage.
|
|
130
|
-
argsGroupUuid:UUID = group_uuid
|
|
131
|
-
|
|
132
|
-
apiMethodName:str = "multizone_member_removed"
|
|
133
|
-
apiMethodParms:SIMethodParmListContext = None
|
|
134
|
-
|
|
135
|
-
try:
|
|
136
|
-
|
|
137
|
-
# trace.
|
|
138
|
-
apiMethodParms = _logsi.EnterMethodParmList(SILevel.Debug, apiMethodName)
|
|
139
|
-
apiMethodParms.AppendKeyValue("group_uuid", argsGroupUuid)
|
|
140
|
-
_logsi.LogMethodParmList(SILevel.Debug, "Chromecast multizone group notification was received for group \"%s\"" % (argsGroupUuid), apiMethodParms, colorValue=SIColors.Lavender)
|
|
141
|
-
|
|
142
|
-
# get device instance.
|
|
143
|
-
scDevice:SpotifyConnectDevice = self._ParentDirectory._SpotifyConnectDevices.GetDeviceByDiscoveryKey(str(argsGroupUuid))
|
|
144
|
-
if (scDevice is None):
|
|
145
|
-
|
|
146
|
-
# trace.
|
|
147
|
-
_logsi.LogVerbose("Could not find SpotifyConnectDevices instance for Cast Group discovery key: \"%s\"" % (str(argsGroupUuid)), colorValue=SIColors.Lavender)
|
|
148
|
-
|
|
149
|
-
else:
|
|
150
|
-
|
|
151
|
-
# trace.
|
|
152
|
-
_logsi.LogVerbose("Chromecast member device %s was removed from multizone group \"%s\"" % (scDevice.Title, self._CastDevice.cast_info.friendly_name), colorValue=SIColors.Lavender)
|
|
153
|
-
|
|
154
|
-
except Exception as ex:
|
|
155
|
-
|
|
156
|
-
# trace.
|
|
157
|
-
_logsi.LogException("Unhandled exception occured while processing Chromecast MultiZoneController notification (%s)" % (apiMethodName), ex, logToSystemLogger=False)
|
|
158
|
-
|
|
159
|
-
# ignore exception, as nothing can be done about it.
|
|
160
|
-
|
|
161
|
-
finally:
|
|
162
|
-
|
|
163
|
-
# trace.
|
|
164
|
-
_logsi.LeaveMethod(SILevel.Debug, apiMethodName)
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
def multizone_status_received(
|
|
168
|
-
self,
|
|
169
|
-
) -> None:
|
|
170
|
-
"""
|
|
171
|
-
Called when Multizone status has been updated.
|
|
172
|
-
"""
|
|
173
|
-
# use lock, as multiple threads could be calling this method simultaneously.
|
|
174
|
-
with self._Zeroconf_RLock:
|
|
175
|
-
|
|
176
|
-
# copy passed parameters to thread-safe storage.
|
|
177
|
-
# n/a
|
|
178
|
-
|
|
179
|
-
apiMethodName:str = "multizone_status_received"
|
|
180
|
-
apiMethodParms:SIMethodParmListContext = None
|
|
181
|
-
|
|
182
|
-
try:
|
|
183
|
-
|
|
184
|
-
# trace.
|
|
185
|
-
apiMethodParms = _logsi.EnterMethodParmList(SILevel.Debug, apiMethodName)
|
|
186
|
-
_logsi.LogMethodParmList(SILevel.Debug, "Chromecast multizone group status has been updated", apiMethodParms, colorValue=SIColors.Lavender)
|
|
187
|
-
|
|
188
|
-
# trace.
|
|
189
|
-
if (_logsi.IsOn(SILevel.Verbose)):
|
|
190
|
-
|
|
191
|
-
# build member list with friendly names.
|
|
192
|
-
result:list[str] = []
|
|
193
|
-
member:str = None
|
|
194
|
-
for member in self._CastMultizoneController.members:
|
|
195
|
-
scDevice:SpotifyConnectDevice = self._ParentDirectory._SpotifyConnectDevices.GetDeviceByDiscoveryKey(member)
|
|
196
|
-
if (scDevice is None):
|
|
197
|
-
result.append(member)
|
|
198
|
-
else:
|
|
199
|
-
result.append(scDevice.Title)
|
|
200
|
-
_logsi.LogArray(SILevel.Verbose, "Chromecast multizone group \"%s\" members (count=%d)" % (self._CastDevice.cast_info.friendly_name, len(result)), result, colorValue=SIColors.Lavender)
|
|
201
|
-
|
|
202
|
-
except Exception as ex:
|
|
203
|
-
|
|
204
|
-
# trace.
|
|
205
|
-
_logsi.LogException("Unhandled exception occured while processing Chromecast MultiZoneController notification (%s)" % (apiMethodName), ex, logToSystemLogger=False)
|
|
206
|
-
|
|
207
|
-
# ignore exception, as nothing can be done about it.
|
|
208
|
-
|
|
209
|
-
finally:
|
|
210
|
-
|
|
211
|
-
# trace.
|
|
212
|
-
_logsi.LeaveMethod(SILevel.Debug, apiMethodName)
|
|
File without changes
|
|
File without changes
|
{spotifywebapipython-1.0.243.dist-info → spotifywebapipython-1.0.244.dist-info}/top_level.txt
RENAMED
|
File without changes
|