Changeset 644 for trunk/StreamVision/StreamVision.py
- Timestamp:
- 05/14/12 17:49:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/StreamVision/StreamVision.py
r643 r644 100 100 systemEvents = app(id='com.apple.systemEvents') 101 101 iTunesWindow = systemEvents.application_processes[u'iTunes'].windows[u'iTunes'] 102 try: 103 remote_speakers = iTunesWindow.buttons[its.attributes['AXDescription'].value.beginswith(u'AirPlay')].title() 104 except CommandError: 105 # with iTunes Store visible, the query fails with errAENoSuchObject 106 for button in iTunesWindow.buttons(): 107 try: 108 if button.attributes['AXDescription'].value().endswith('AirPlay'): 109 remote_speakers = [button.title()] 110 break 111 except CommandError: 112 pass 113 else: 114 return False # XXX shouldn't get here 102 remote_speakers = iTunesWindow.buttons[its.attributes['AXDescription'].value.beginswith(u'AirPlay')].title() 115 103 return remote_speakers and remote_speakers[0] not in (None, k.missing_value) 116 104
Note:
See TracChangeset
for help on using the changeset viewer.