GameSentenceMiner 2.8.47__py3-none-any.whl → 2.8.48__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.
- GameSentenceMiner/configuration.py +11 -10
- GameSentenceMiner/obs.py +6 -3
- GameSentenceMiner/ss_selector.py +1 -1
- {gamesentenceminer-2.8.47.dist-info → gamesentenceminer-2.8.48.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.8.47.dist-info → gamesentenceminer-2.8.48.dist-info}/RECORD +9 -9
- {gamesentenceminer-2.8.47.dist-info → gamesentenceminer-2.8.48.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.8.47.dist-info → gamesentenceminer-2.8.48.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.8.47.dist-info → gamesentenceminer-2.8.48.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.8.47.dist-info → gamesentenceminer-2.8.48.dist-info}/top_level.txt +0 -0
@@ -446,20 +446,21 @@ def get_log_path():
|
|
446
446
|
|
447
447
|
temp_directory = ''
|
448
448
|
|
449
|
-
def get_temporary_directory():
|
449
|
+
def get_temporary_directory(delete=True):
|
450
450
|
global temp_directory
|
451
451
|
if not temp_directory:
|
452
452
|
temp_directory = os.path.join(get_app_directory(), 'temp')
|
453
453
|
os.makedirs(temp_directory, exist_ok=True)
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
os.
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
454
|
+
if delete:
|
455
|
+
for filename in os.listdir(temp_directory):
|
456
|
+
file_path = os.path.join(temp_directory, filename)
|
457
|
+
try:
|
458
|
+
if os.path.isfile(file_path) or os.path.islink(file_path):
|
459
|
+
os.unlink(file_path)
|
460
|
+
elif os.path.isdir(file_path):
|
461
|
+
shutil.rmtree(file_path)
|
462
|
+
except Exception as e:
|
463
|
+
logger.error(f"Failed to delete {file_path}. Reason: {e}")
|
463
464
|
return temp_directory
|
464
465
|
|
465
466
|
def get_config_path():
|
GameSentenceMiner/obs.py
CHANGED
@@ -28,9 +28,12 @@ class OBSConnectionManager(threading.Thread):
|
|
28
28
|
def run(self):
|
29
29
|
while self.running:
|
30
30
|
time.sleep(1)
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
try:
|
32
|
+
if not client or not client.get_version():
|
33
|
+
logger.info("OBS WebSocket not connected. Attempting to reconnect...")
|
34
|
+
connect_to_obs()
|
35
|
+
except Exception as e:
|
36
|
+
logger.debug(f"Error checking OBS connection: {e}")
|
34
37
|
|
35
38
|
def stop(self):
|
36
39
|
self.running = False
|
GameSentenceMiner/ss_selector.py
CHANGED
@@ -91,7 +91,7 @@ def display_images(image_paths, golden_frame):
|
|
91
91
|
return selected_path.get()
|
92
92
|
|
93
93
|
def run_extraction_and_display(video_path, timestamp_str, mode):
|
94
|
-
temp_dir = os.path.join(get_temporary_directory(), "screenshot_frames", sanitize_filename(os.path.splitext(os.path.basename(video_path))[0]))
|
94
|
+
temp_dir = os.path.join(get_temporary_directory(False), "screenshot_frames", sanitize_filename(os.path.splitext(os.path.basename(video_path))[0]))
|
95
95
|
os.makedirs(temp_dir, exist_ok=True)
|
96
96
|
image_paths, golden_frame = extract_frames(video_path, timestamp_str, temp_dir, mode)
|
97
97
|
if image_paths:
|
@@ -1,17 +1,17 @@
|
|
1
1
|
GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
GameSentenceMiner/anki.py,sha256=p4z8qleEKkOrMyBe7LeVfXzuFowQtk-ZyHr_7PyYt8U,14464
|
3
3
|
GameSentenceMiner/config_gui.py,sha256=J3R_oh4edAULY9_0UEuEnRhRczakyta_f5hnegpC1uQ,77373
|
4
|
-
GameSentenceMiner/configuration.py,sha256=
|
4
|
+
GameSentenceMiner/configuration.py,sha256=hFOqKxqKEpuoSqGJ8qgdPKgchwv16ak7SIn9iXijNpk,22494
|
5
5
|
GameSentenceMiner/electron_config.py,sha256=dGcPYCISPehXubYSzsDuI2Gl092MYK0u3bTnkL9Jh1Y,9787
|
6
6
|
GameSentenceMiner/ffmpeg.py,sha256=sf_Wz4ijFOYKRZI4qhRc32Y9E2zZuPscLv_VU8ZYCHU,18250
|
7
7
|
GameSentenceMiner/gametext.py,sha256=hcyZQ69B7xB5ZG85wLzM5au7ZPKxmeUXsmUD26oyk_0,5660
|
8
8
|
GameSentenceMiner/gsm.py,sha256=dZt2Gnwqwj-i-yRpGJWBmCBRaBjEUCzi3L3P-gcVkfA,27266
|
9
9
|
GameSentenceMiner/model.py,sha256=1lRyJFf_LND_4O16h8CWVqDfosLgr0ZS6ufBZ3qJHpY,5699
|
10
10
|
GameSentenceMiner/notification.py,sha256=pXKoLfmRQLH55IQ5G6uxdMuczqX7D6l3ubVEY1e6hXg,2859
|
11
|
-
GameSentenceMiner/obs.py,sha256=
|
11
|
+
GameSentenceMiner/obs.py,sha256=_u3HinIfxJIL7gN1KueOHCQYPDc3l9ctaX4kaV1qgC0,14632
|
12
12
|
GameSentenceMiner/obs_back.py,sha256=_N_UV7Nh5cyy3mnH5lOUOzhgZwHMACeFEuBo1Z-bNzg,10894
|
13
13
|
GameSentenceMiner/package.py,sha256=YlS6QRMuVlm6mdXx0rlXv9_3erTGS21jaP3PNNWfAH0,1250
|
14
|
-
GameSentenceMiner/ss_selector.py,sha256=
|
14
|
+
GameSentenceMiner/ss_selector.py,sha256=csey9H3561-guRJcT6gQN6hXxvylP0CBI0dp2-kwo2Q,4446
|
15
15
|
GameSentenceMiner/text_log.py,sha256=MD7LB5D-v4G0Bnm3uGvZQ0aV38Fcj4E0vgq7mmyQ7_4,5157
|
16
16
|
GameSentenceMiner/util.py,sha256=PrDNnxWiJZh1lGuwnp3DjWIlwbkVxweRTYWLtQk94Ao,9122
|
17
17
|
GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -54,9 +54,9 @@ GameSentenceMiner/web/static/web-app-manifest-512x512.png,sha256=wyqgCWCrLEUxSRX
|
|
54
54
|
GameSentenceMiner/web/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
55
55
|
GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
|
56
56
|
GameSentenceMiner/web/templates/utility.html,sha256=P659ZU2j7tcbJ5xPO3p7E_SQpkp3CrrFtSvvXJNNuLI,16330
|
57
|
-
gamesentenceminer-2.8.
|
58
|
-
gamesentenceminer-2.8.
|
59
|
-
gamesentenceminer-2.8.
|
60
|
-
gamesentenceminer-2.8.
|
61
|
-
gamesentenceminer-2.8.
|
62
|
-
gamesentenceminer-2.8.
|
57
|
+
gamesentenceminer-2.8.48.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
58
|
+
gamesentenceminer-2.8.48.dist-info/METADATA,sha256=u7fFMnmpN0JaK_OMxFjfSug5xJ_hVWr0dA4VPb-kJe0,7218
|
59
|
+
gamesentenceminer-2.8.48.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
60
|
+
gamesentenceminer-2.8.48.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
61
|
+
gamesentenceminer-2.8.48.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
62
|
+
gamesentenceminer-2.8.48.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|