Changeset 644


Ignore:
Timestamp:
05/14/12 17:49:01 (12 years ago)
Author:
Nicholas Riley
Message:

StreamVision.py: Remove workaround for iTunes Store accessibility bug in older iTunes versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StreamVision/StreamVision.py

    r643 r644  
    100100    systemEvents = app(id='com.apple.systemEvents')
    101101    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()
    115103    return remote_speakers and remote_speakers[0] not in (None, k.missing_value)
    116104
Note: See TracChangeset for help on using the changeset viewer.