예제 #1
0
def connect_iTunes(profile={}):
    global __itc
    if not __itc:
        __itc = DACP.itunes(
            profile['itunes']['host'], profile['itunes']['guid']
        )
    return __itc
예제 #2
0
파일: music.py 프로젝트: yannickulrich/IRIS
def configure(old_profile):
    if not old_profile:
        old_profile = {'host': '', 'guid': ''}
    else:
        print "Host: %s\nGUID: %s" % (old_profile['host'], old_profile['guid'])
        if yn_input("Is this information correct"):
            return old_profile

    print "Open iTunes and choose IRIS as a remote. Enter any passcode"
    host, guid = DACP.pair()
    return {'host': host, 'guid': guid}