Changeset 646 for trunk/StreamVision
- Timestamp:
- 05/24/12 20:40:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/StreamVision/StreamVision.py
r645 r646 102 102 systemEvents = app(id='com.apple.systemEvents') 103 103 iTunesWindow = systemEvents.application_processes[u'iTunes'].windows[u'iTunes'] 104 remote_speakers = iTunesWindow.buttons[its.attributes['AXDescription'].value.beginswith(u'AirPlay')].title() 104 # Can't get AirPlay status with iTunes Mini Player or window on other Space. 105 try: 106 remote_speakers = iTunesWindow.buttons[its.attributes['AXDescription'].value.beginswith(u'AirPlay')].title() 107 except CommandError: # window on another Space? 108 return True 105 109 return remote_speakers and remote_speakers[0] not in (None, k.missing_value) 106 110
Note:
See TracChangeset
for help on using the changeset viewer.