GameSentenceMiner 2.1.0__py3-none-any.whl → 2.1.1__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/config_gui.py +4 -3
- GameSentenceMiner/package_updater.py +6 -19
- {GameSentenceMiner-2.1.0.dist-info → GameSentenceMiner-2.1.1.dist-info}/METADATA +1 -1
- {GameSentenceMiner-2.1.0.dist-info → GameSentenceMiner-2.1.1.dist-info}/RECORD +7 -7
- {GameSentenceMiner-2.1.0.dist-info → GameSentenceMiner-2.1.1.dist-info}/WHEEL +0 -0
- {GameSentenceMiner-2.1.0.dist-info → GameSentenceMiner-2.1.1.dist-info}/entry_points.txt +0 -0
- {GameSentenceMiner-2.1.0.dist-info → GameSentenceMiner-2.1.1.dist-info}/top_level.txt +0 -0
GameSentenceMiner/config_gui.py
CHANGED
@@ -91,11 +91,12 @@ class ConfigApp:
|
|
91
91
|
self.window.withdraw()
|
92
92
|
|
93
93
|
def update_now(self):
|
94
|
-
update_available, version = check_for_updates()
|
94
|
+
update_available, version = check_for_updates(force=True)
|
95
95
|
if update_available:
|
96
|
+
messagebox.showinfo("Update", "GSM will now close and update")
|
96
97
|
success = update()
|
97
|
-
if success:
|
98
|
-
messagebox.showinfo("Update
|
98
|
+
if not success:
|
99
|
+
messagebox.showinfo("Update Unsuccessful", "Couldn't Start Update, please update manually.")
|
99
100
|
else:
|
100
101
|
messagebox.showinfo("No Update Found", "No update found.")
|
101
102
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import os
|
2
|
-
import
|
2
|
+
from importlib import metadata
|
3
3
|
import sys
|
4
4
|
import requests
|
5
5
|
|
@@ -10,20 +10,10 @@ VERSION_FILE_PATH = os.path.join(get_app_directory(), 'version.txt')
|
|
10
10
|
|
11
11
|
def get_current_version():
|
12
12
|
try:
|
13
|
-
|
14
|
-
version = file.read().strip()
|
13
|
+
version = metadata.version(PACKAGE_NAME)
|
15
14
|
return version
|
16
|
-
except
|
17
|
-
|
18
|
-
set_current_version(latest_version)
|
19
|
-
return latest_version
|
20
|
-
|
21
|
-
def set_current_version(version):
|
22
|
-
try:
|
23
|
-
with open(VERSION_FILE_PATH, 'w') as file:
|
24
|
-
file.write(version)
|
25
|
-
except Exception as e:
|
26
|
-
logger.error(f"Error writing to {VERSION_FILE_PATH}: {e}")
|
15
|
+
except metadata.PackageNotFoundError:
|
16
|
+
return None
|
27
17
|
|
28
18
|
def get_latest_version():
|
29
19
|
try:
|
@@ -50,10 +40,7 @@ def check_for_updates(force=False):
|
|
50
40
|
|
51
41
|
def update():
|
52
42
|
try:
|
53
|
-
|
54
|
-
|
55
|
-
set_current_version(get_latest_version())
|
56
|
-
return True
|
57
|
-
except subprocess.CalledProcessError as e:
|
43
|
+
os.execl(sys.executable, sys.executable, "-m", "pip", "install", "--upgrade", PACKAGE_NAME)
|
44
|
+
except Exception as e:
|
58
45
|
logger.error(f"Error updating {PACKAGE_NAME}: {e}")
|
59
46
|
return False
|
@@ -1,6 +1,6 @@
|
|
1
1
|
GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
GameSentenceMiner/anki.py,sha256=3UT6K5PxzJMDoiXyOULrkeCoJ0KMq7JvBw6XhcLCirE,9114
|
3
|
-
GameSentenceMiner/config_gui.py,sha256=
|
3
|
+
GameSentenceMiner/config_gui.py,sha256=QqhjFlQvh4W2h18n3xirQfgil3dFW7rigk8vIH29aCM,48927
|
4
4
|
GameSentenceMiner/configuration.py,sha256=CSg67qIzEdj_w-dS-NEls9syyTeJD3rfPrwSZLomFcU,14029
|
5
5
|
GameSentenceMiner/ffmpeg.py,sha256=hdKimzkpAKsE-17qEAQg4uHy4-TtdFywYx48Skn9cPs,10418
|
6
6
|
GameSentenceMiner/gametext.py,sha256=GpR9P8h3GmmKH46Dw13kJPx66n3jGjFCiV8Fcrqn9E8,3999
|
@@ -8,14 +8,14 @@ GameSentenceMiner/gsm.py,sha256=GqMNcb8w117clJfFiNLhDbZ8eOFQTyVhejrjHvsBJXo,1507
|
|
8
8
|
GameSentenceMiner/model.py,sha256=oh8VVT8T1UKekbmP6MGNgQ8jIuQ_7Rg4GPzDCn2kJo8,1999
|
9
9
|
GameSentenceMiner/notification.py,sha256=sWgIIXhaB9WV1K_oQGf5-IR6q3dakae_QS-RuIvbcEs,1939
|
10
10
|
GameSentenceMiner/obs.py,sha256=gutnRk30jIxuvrpEosR9jw2h_tll36wgtAZkUF-vWDY,5256
|
11
|
-
GameSentenceMiner/package_updater.py,sha256=
|
11
|
+
GameSentenceMiner/package_updater.py,sha256=s1OVFZbWcuRz6_vDYRtingDpOGCJNepqXiXa_-klh-I,1470
|
12
12
|
GameSentenceMiner/util.py,sha256=OYg0j_rT9F7v3aJRwWnHvdWMYyxGlimrvw7U2C9ifeY,4441
|
13
13
|
GameSentenceMiner/vad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
14
|
GameSentenceMiner/vad/silero_trim.py,sha256=r7bZYEj-NUXGKgD2UIhLrbTPyq0rau97qGtrMZcRK4A,1517
|
15
15
|
GameSentenceMiner/vad/vosk_helper.py,sha256=lWmlGMhmg_0QoWeCHrXwz9wDKPqY37BckHCekGVtJUI,5794
|
16
16
|
GameSentenceMiner/vad/whisper_helper.py,sha256=9kmPeSs6jRcKSVxYY-vtyTcqVUDORR4q1nl8fqxHHn4,3379
|
17
|
-
GameSentenceMiner-2.1.
|
18
|
-
GameSentenceMiner-2.1.
|
19
|
-
GameSentenceMiner-2.1.
|
20
|
-
GameSentenceMiner-2.1.
|
21
|
-
GameSentenceMiner-2.1.
|
17
|
+
GameSentenceMiner-2.1.1.dist-info/METADATA,sha256=aWK654nAZfRBJ07cX0FDLQ2qPqm9_n1sbGDj2vQT3pE,13535
|
18
|
+
GameSentenceMiner-2.1.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
19
|
+
GameSentenceMiner-2.1.1.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
20
|
+
GameSentenceMiner-2.1.1.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
21
|
+
GameSentenceMiner-2.1.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|