mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-14 00:07:14 +03:00
Add extra logging for Frontier Auth, especially via edmc://
This commit is contained in:
parent
74afcb085a
commit
baa86b4fbf
@ -48,6 +48,7 @@ class GenericProtocolHandler:
|
||||
self.lastpayload = url
|
||||
|
||||
if not config.shutting_down:
|
||||
logger.debug('event_generate("<<CompanionAuthEvent>>"')
|
||||
self.master.event_generate('<<CompanionAuthEvent>>', when="tail")
|
||||
|
||||
|
||||
@ -289,6 +290,7 @@ elif sys.platform == 'win32' and getattr(sys, 'frozen', False) and not is_wine a
|
||||
msg = MSG()
|
||||
# Calls GetMessageW: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmessagew
|
||||
while GetMessageW(byref(msg), None, 0, 0) != 0:
|
||||
logger.trace(f'DDE message of type: {msg.message}')
|
||||
if msg.message == WM_DDE_EXECUTE:
|
||||
# GlobalLock does some sort of "please dont move this?"
|
||||
# https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-globallock
|
||||
@ -296,8 +298,10 @@ elif sys.platform == 'win32' and getattr(sys, 'frozen', False) and not is_wine a
|
||||
GlobalUnlock(msg.lParam) # Unlocks the GlobalLock-ed object
|
||||
|
||||
if args.lower().startswith('open("') and args.endswith('")'):
|
||||
logger.trace(f'args are: {args}')
|
||||
url = urllib.parse.unquote(args[6:-2]).strip()
|
||||
if url.startswith(self.redirect):
|
||||
logger.debug(f'Message starts with {self.redirect}')
|
||||
self.event(url)
|
||||
|
||||
SetForegroundWindow(GetParent(self.master.winfo_id())) # raise app window
|
||||
|
Loading…
x
Reference in New Issue
Block a user