GameSentenceMiner 2.2.2.post1__py3-none-any.whl → 2.2.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.
@@ -813,7 +813,7 @@ class ConfigApp:
813
813
  def add_profile(self):
814
814
  new_profile_name = simpledialog.askstring("Input", "Enter new profile name:")
815
815
  if new_profile_name:
816
- self.master_config.configs[new_profile_name] = self.master_config.default_config
816
+ self.master_config.configs[new_profile_name] = self.master_config.get_default_config()
817
817
  self.profile_combobox['values'] = list(self.master_config.configs.keys())
818
818
  self.profile_combobox.set(new_profile_name)
819
819
  self.save_settings()
@@ -249,6 +249,9 @@ class Config:
249
249
  def get_all_profile_names(self):
250
250
  return list(self.configs.keys())
251
251
 
252
+ def get_default_config(self):
253
+ return self.configs[DEFAULT_CONFIG]
254
+
252
255
 
253
256
  def get_app_directory():
254
257
  if platform == 'win32': # Windows
GameSentenceMiner/gsm.py CHANGED
@@ -89,22 +89,19 @@ class VideoToAudioHandler(FileSystemEventHandler):
89
89
  should_update_audio = False
90
90
  vad_trimmed_audio = ""
91
91
  logger.info("No SentenceAudio Field in config, skipping audio processing!")
92
- try:
93
92
  # Only update sentenceaudio if it's not present. Want to avoid accidentally overwriting sentence audio
94
- try:
95
- if get_config().anki.update_anki and last_note:
96
- anki.update_anki_card(last_note, note, audio_path=final_audio_output, video_path=video_path,
97
- tango=tango,
98
- should_update_audio=should_update_audio,
99
- ss_time=ss_timing)
100
- elif get_config().features.notify_on_update and should_update_audio:
101
- notification.send_audio_generated_notification(vad_trimmed_audio)
102
- except Exception as e:
103
- logger.error(f"Card failed to update! Maybe it was removed? {e}")
104
- except FileNotFoundError as f:
105
- logger.error("Something went wrong with processing, anki card not updated")
93
+ try:
94
+ if get_config().anki.update_anki and last_note:
95
+ anki.update_anki_card(last_note, note, audio_path=final_audio_output, video_path=video_path,
96
+ tango=tango,
97
+ should_update_audio=should_update_audio,
98
+ ss_time=ss_timing)
99
+ elif get_config().features.notify_on_update and should_update_audio:
100
+ notification.send_audio_generated_notification(vad_trimmed_audio)
101
+ except Exception as e:
102
+ logger.exception(f"Card failed to update! Maybe it was removed? {e}")
106
103
  except Exception as e:
107
- logger.error(f"Some error was hit catching to allow further work to be done: {e}", exc_info=1)
104
+ logger.exception(f"Some error was hit catching to allow further work to be done: {e}")
108
105
  if get_config().paths.remove_video and os.path.exists(video_path):
109
106
  os.remove(video_path) # Optionally remove the video after conversion
110
107
  if get_config().paths.remove_audio and os.path.exists(vad_trimmed_audio):
GameSentenceMiner/obs.py CHANGED
@@ -79,7 +79,8 @@ def on_disconnect(obs):
79
79
  def connect_to_obs(start_replay=False):
80
80
  global client
81
81
  if get_config().obs.enabled:
82
- get_obs_websocket_config_values()
82
+ if util.is_windows():
83
+ get_obs_websocket_config_values()
83
84
  client = obsws(host=get_config().obs.host, port=get_config().obs.port,
84
85
  password=get_config().obs.password, authreconnect=1, on_connect=on_connect,
85
86
  on_disconnect=on_disconnect)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: GameSentenceMiner
3
- Version: 2.2.2.post1
3
+ Version: 2.2.3
4
4
  Summary: A tool for mining sentences from games. Update: Use ffprobe from GSM Directory
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/bpwhelan/GameSentenceMiner
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.11
12
+ Requires-Python: >=3.10
13
13
  Description-Content-Type: text/markdown
14
14
  Requires-Dist: requests~=2.32.3
15
15
  Requires-Dist: watchdog~=5.0.2
@@ -1,13 +1,13 @@
1
1
  GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  GameSentenceMiner/anki.py,sha256=_yaHQZwOYooQssfJ5hbST5cC6vsffkSEvUIeMouwQZw,9208
3
- GameSentenceMiner/config_gui.py,sha256=d9bQUUI-QR879FJJsROcQ4Y7gk08h95uPNGN1DWdIuU,49005
4
- GameSentenceMiner/configuration.py,sha256=Cw5vUF74ZKcSinbciNMiLKpMO8M6sf-0THokHO_31nE,14010
3
+ GameSentenceMiner/config_gui.py,sha256=PMJ-Ghyp_Vgt2w9CwDpN5rc41QHlLtnmiYR50Hy9p_s,49011
4
+ GameSentenceMiner/configuration.py,sha256=tkbZfVf-XxmVdJzfjS6GUvy878qnnHa_KxXGAN0UEqI,14089
5
5
  GameSentenceMiner/ffmpeg.py,sha256=txTpco-IGWtfF8vIiWUzrtgI5TA1xPVIK-WJWxU02mM,10878
6
6
  GameSentenceMiner/gametext.py,sha256=pAovclbBSLigoyJMcdhNrieFDDPLJY3htHBGhjQ2Xk0,4081
7
- GameSentenceMiner/gsm.py,sha256=6LX3kFhyB1QoXFr5jzGZvONzQa6_PmPn_R7o2AiRRqA,16493
7
+ GameSentenceMiner/gsm.py,sha256=Z_e29j-RYsEC6JGLP-wONocv1wfojDa06FIzxUz8pE8,16285
8
8
  GameSentenceMiner/model.py,sha256=oh8VVT8T1UKekbmP6MGNgQ8jIuQ_7Rg4GPzDCn2kJo8,1999
9
9
  GameSentenceMiner/notification.py,sha256=WBaQWoPNhW4XqdPBUmxPBgjk0ngzH_4v9zMQ-XQAKC8,2010
10
- GameSentenceMiner/obs.py,sha256=8q0a17jJuaAlgkg0EHeCCCNdGlsxfg5TPB-sjPJNksk,6197
10
+ GameSentenceMiner/obs.py,sha256=3Flcjxy812VpF78EPI7sxlGx6yyM3GfqzlinW17SK20,6231
11
11
  GameSentenceMiner/package_updater.py,sha256=KBJwLrlcAyoGHNNmDSVdPgWawqfWiIWOodcZhYheoms,1486
12
12
  GameSentenceMiner/util.py,sha256=cgKpPfRpouWI6tjE_35MWp8nXqRzXs3LvsYXWm5_DOg,4584
13
13
  GameSentenceMiner/downloader/Untitled_json.py,sha256=RUUl2bbbCpUDUUS0fP0tdvf5FngZ7ILdA_J5TFYAXUQ,15272
@@ -17,8 +17,8 @@ GameSentenceMiner/vad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
17
17
  GameSentenceMiner/vad/silero_trim.py,sha256=syDJX_KbFmdyFFtnQqYTD0tICsUCJizYhs-atPgXtxA,1549
18
18
  GameSentenceMiner/vad/vosk_helper.py,sha256=-AAwK0cgOC5rK3_gL0sQgrPJ75E49g_PxZR4d5ckwc4,5826
19
19
  GameSentenceMiner/vad/whisper_helper.py,sha256=bpR1HVnJRn9H5u8XaHBqBJ6JwIjzqn-Fajps8QmQ4zc,3411
20
- GameSentenceMiner-2.2.2.post1.dist-info/METADATA,sha256=grrT_Td6jB9w3pRoOw91noJFMxUup9tzdRgntlRd1uU,10131
21
- GameSentenceMiner-2.2.2.post1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
22
- GameSentenceMiner-2.2.2.post1.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
23
- GameSentenceMiner-2.2.2.post1.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
24
- GameSentenceMiner-2.2.2.post1.dist-info/RECORD,,
20
+ GameSentenceMiner-2.2.3.dist-info/METADATA,sha256=8tTYMSToJ11bkM8XMjZLEihZh_VunSVXm1WqI4uqusY,10125
21
+ GameSentenceMiner-2.2.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
22
+ GameSentenceMiner-2.2.3.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
23
+ GameSentenceMiner-2.2.3.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
24
+ GameSentenceMiner-2.2.3.dist-info/RECORD,,