GameSentenceMiner 2.18.1__py3-none-any.whl → 2.18.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of GameSentenceMiner might be problematic. Click here for more details.
- GameSentenceMiner/util/configuration.py +2 -1
- GameSentenceMiner/util/get_overlay_coords.py +32 -31
- {gamesentenceminer-2.18.1.dist-info → gamesentenceminer-2.18.3.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.18.1.dist-info → gamesentenceminer-2.18.3.dist-info}/RECORD +8 -8
- {gamesentenceminer-2.18.1.dist-info → gamesentenceminer-2.18.3.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.18.1.dist-info → gamesentenceminer-2.18.3.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.18.1.dist-info → gamesentenceminer-2.18.3.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.18.1.dist-info → gamesentenceminer-2.18.3.dist-info}/top_level.txt +0 -0
|
@@ -864,10 +864,11 @@ class Config:
|
|
|
864
864
|
# Add a way to migrate certain things based on version if needed, also help with better defaults
|
|
865
865
|
if self.version:
|
|
866
866
|
if self.version != get_current_version():
|
|
867
|
+
from packaging import version
|
|
867
868
|
logger.info(f"Config version mismatch detected: {self.version} != {get_current_version()}")
|
|
868
869
|
# Handle version mismatch
|
|
869
870
|
changed = False
|
|
870
|
-
if self.version < "2.18.0":
|
|
871
|
+
if version.parse(self.version) < version.parse("2.18.0"):
|
|
871
872
|
changed = True
|
|
872
873
|
# Example, doesn't need to be done
|
|
873
874
|
for profile in self.configs.values():
|
|
@@ -188,40 +188,41 @@ class OverlayProcessor:
|
|
|
188
188
|
For primary monitor, excludes taskbar. For others, returns full monitor area.
|
|
189
189
|
monitor_index: 0 = primary monitor, 1+ = others (as in mss.monitors).
|
|
190
190
|
"""
|
|
191
|
+
# set_dpi_awareness()
|
|
191
192
|
with mss.mss() as sct:
|
|
192
193
|
monitors = sct.monitors[1:]
|
|
193
|
-
return monitors[monitor_index] if 0 <= monitor_index < len(monitors) else monitors[0]
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
194
|
+
# return monitors[monitor_index] if 0 <= monitor_index < len(monitors) else monitors[0]
|
|
195
|
+
if is_windows() and monitor_index == 0:
|
|
196
|
+
from ctypes import wintypes
|
|
197
|
+
import ctypes
|
|
198
|
+
# Get work area for primary monitor (ignores taskbar)
|
|
199
|
+
SPI_GETWORKAREA = 0x0030
|
|
200
|
+
rect = wintypes.RECT()
|
|
201
|
+
res = ctypes.windll.user32.SystemParametersInfoW(
|
|
202
|
+
SPI_GETWORKAREA, 0, ctypes.byref(rect), 0
|
|
203
|
+
)
|
|
204
|
+
if not res:
|
|
205
|
+
raise ctypes.WinError()
|
|
205
206
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
207
|
+
return {
|
|
208
|
+
"left": rect.left,
|
|
209
|
+
"top": rect.top,
|
|
210
|
+
"width": rect.right - rect.left,
|
|
211
|
+
"height": rect.bottom - rect.top,
|
|
212
|
+
}
|
|
213
|
+
elif is_windows() and monitor_index > 0:
|
|
214
|
+
# Secondary monitors: just return with a guess of how tall the taskbar is
|
|
215
|
+
taskbar_height_guess = 48 # A common taskbar height, may vary
|
|
216
|
+
mon = monitors[monitor_index]
|
|
217
|
+
return {
|
|
218
|
+
"left": mon["left"],
|
|
219
|
+
"top": mon["top"],
|
|
220
|
+
"width": mon["width"],
|
|
221
|
+
"height": mon["height"] - taskbar_height_guess
|
|
222
|
+
}
|
|
223
|
+
else:
|
|
224
|
+
# For non-Windows systems or unspecified monitors, return the monitor area as-is
|
|
225
|
+
return monitors[monitor_index] if 0 <= monitor_index < len(monitors) else monitors[0]
|
|
225
226
|
|
|
226
227
|
|
|
227
228
|
def _get_full_screenshot(self) -> Tuple[Image.Image | None, int, int]:
|
|
@@ -40,11 +40,11 @@ GameSentenceMiner/ui/anki_confirmation.py,sha256=m27IcWbUwb6o6Klh3NwXBc2FtMX9Da3
|
|
|
40
40
|
GameSentenceMiner/ui/config_gui.py,sha256=Nt6uuJrinOrSpDdrw92zdd1GvyQNjOoGvkZQdGWA9ds,151913
|
|
41
41
|
GameSentenceMiner/ui/screenshot_selector.py,sha256=AKML87MpgYQeSuj1F10GngpNrn9qp06zLLzNRwrQWM8,8900
|
|
42
42
|
GameSentenceMiner/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
|
-
GameSentenceMiner/util/configuration.py,sha256=
|
|
43
|
+
GameSentenceMiner/util/configuration.py,sha256=fYlU4Qrr6T-k_G2MY2rgoQ9EV_k7XBfbtsO8q7PKTsU,46653
|
|
44
44
|
GameSentenceMiner/util/db.py,sha256=3Fs75pGJyf8-3y3k6Zfpgp8z9tYL9-ZvQUk_FgDc9Vw,28664
|
|
45
45
|
GameSentenceMiner/util/electron_config.py,sha256=KfeJToeFFVw0IR5MKa-gBzpzaGrU-lyJbR9z-sDEHYU,8767
|
|
46
46
|
GameSentenceMiner/util/ffmpeg.py,sha256=cAzztfY36Xf2WvsJDjavoiMOvA9ac2GVdCrSB4LzHk4,29007
|
|
47
|
-
GameSentenceMiner/util/get_overlay_coords.py,sha256=
|
|
47
|
+
GameSentenceMiner/util/get_overlay_coords.py,sha256=c37zVKPxFqwIi5XjZKjxRCW_Y8W4e1MX7vSLLwcOhs4,22116
|
|
48
48
|
GameSentenceMiner/util/gsm_utils.py,sha256=mASECTmN10c2yPL4NEfLg0Y0YWwFso1i6r_hhJPR3MY,10974
|
|
49
49
|
GameSentenceMiner/util/model.py,sha256=R-_RYTYLSDNgBoVTPuPBcIHeOznIqi_vBzQ7VQ20WYk,6727
|
|
50
50
|
GameSentenceMiner/util/notification.py,sha256=YBhf_mSo_i3cjBz-pmeTPx3wchKiG9BK2VBdZSa2prQ,4597
|
|
@@ -124,9 +124,9 @@ GameSentenceMiner/web/templates/components/kanji_grid/thousand_character_classic
|
|
|
124
124
|
GameSentenceMiner/web/templates/components/kanji_grid/wanikani_levels.json,sha256=8wjnnaYQqmho6t5tMxrIAc03512A2tYhQh5dfsQnfAM,11372
|
|
125
125
|
GameSentenceMiner/web/templates/components/kanji_grid/words_hk_frequency_list.json,sha256=wRkqZNPzz6DT9OTPHpXwfqW96Qb96stCQNNgOL-ZdKk,17535
|
|
126
126
|
GameSentenceMiner/wip/__init___.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
127
|
-
gamesentenceminer-2.18.
|
|
128
|
-
gamesentenceminer-2.18.
|
|
129
|
-
gamesentenceminer-2.18.
|
|
130
|
-
gamesentenceminer-2.18.
|
|
131
|
-
gamesentenceminer-2.18.
|
|
132
|
-
gamesentenceminer-2.18.
|
|
127
|
+
gamesentenceminer-2.18.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
128
|
+
gamesentenceminer-2.18.3.dist-info/METADATA,sha256=DGaCDSt8zzYwt0sak9LlqbqQ6uGlA8-vHGX6G1XCLTU,7487
|
|
129
|
+
gamesentenceminer-2.18.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
130
|
+
gamesentenceminer-2.18.3.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
|
131
|
+
gamesentenceminer-2.18.3.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
|
132
|
+
gamesentenceminer-2.18.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|