diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2023-12-04 19:17:06 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2023-12-04 19:17:06 +0100 |
commit | c27035a029cdcbfb854ea0760fd083b5d8870c6d (patch) | |
tree | 5774bbab92e471ebac547e726286cb70b4d3c49b /win32.py | |
parent | 78a31a0768b0c2b6232514e5ffbfd26c7901c4b0 (diff) |
Use of orderedDict in order to give higher priority to custom layer
Diffstat (limited to 'win32.py')
-rwxr-xr-x | win32.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -87,10 +87,11 @@ class Listener(object): if title.value is None:
return
title = str(title.value).lower()
- for pattern, code in self.mapping.items():
+ for pattern in reversed(self.mapping):
if pattern == "default":
continue
if pattern in title:
+ code = self.mapping[pattern]
self.queue.put ( (code, None) )
return
default = self.mapping.get("default", None)
|