Changeset 663


Ignore:
Timestamp:
05/17/13 21:10:46 (6 years ago)
Author:
Nicholas Riley
Message:

StreamVision?.py: Remove terminology workaround, no longer necessary
for current iTunes 10 or 11. Use new Apple Event exposed AirPlay?
queries in iTunes 11.0.3 if available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StreamVision/StreamVision.py

    r658 r663  
    1414import scrape
    1515import HotKey
    16 import tunes # <https://github.com/abarnert/itunesterms>
    1716
    1817GROWL_APP_NAME = 'StreamVision'
     
    8281    return name
    8382
    84 def iTunesApp(): return app(id='com.apple.iTunes', terms=tunes)
     83def iTunesApp(): return app(id='com.apple.iTunes')
    8584def XTensionApp(): return app(creator='SHEx')
    8685def AmuaApp(): return app('Amua.app')
     
    106105    if not HAVE_XTENSION:
    107106        return False
     107    try:
     108        # A bit better in iTunes 11.0.3, but can't do this via an Apple
     109        # Event descriptor; have to send multiple events
     110        iTunes = iTunesApp()
     111        return any(d.kind() != k.computer for d in it.current_AirPlay_devices())
     112    except AttributeError:
     113        pass
     114
    108115    systemEvents = app(id='com.apple.systemEvents')
    109116    iTunesWindow = systemEvents.application_processes[u'iTunes'].windows[u'iTunes']
Note: See TracChangeset for help on using the changeset viewer.