Example #1
0
from myaccounts.modules import control

control.set_active_monitor()

params = {}
for param in sys.argv[1:]:
	param = param.split('=')
	param_dict = dict([param])
	params = dict(params, **param_dict)

action = params.get('action')
query = params.get('query')
addon_id = params.get('addon_id')

if action and not any(i in action for i in ['Auth', 'Revoke']):
	control.release_active_monitor()

if action is None:
	control.openSettings(query, "script.module.myaccounts")

elif action == 'traktAcct':
	from myaccounts.modules import trakt
	trakt.Trakt().account_info_to_dialog()

elif action == 'traktAuth':
	from myaccounts.modules import trakt
	control.function_monitor(trakt.Trakt().auth)

elif action == 'traktRevoke':
	from myaccounts.modules import trakt
	control.function_monitor(trakt.Trakt().revoke)
Example #2
0
def openMASettings(query=None):
	control.openSettings(query)
	while not control.condVisibility('Window.IsVisible(addonsettings)'):
		control.sleep(250)
	control.release_active_monitor()