GameSentenceMiner 2.9.13__py3-none-any.whl → 2.9.14__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/anki.py CHANGED
@@ -1,3 +1,4 @@
1
+ import queue
1
2
  import time
2
3
 
3
4
  import base64
@@ -269,13 +270,15 @@ def check_for_new_cards():
269
270
  new_card_ids = current_note_ids - previous_note_ids
270
271
  if new_card_ids and not first_run:
271
272
  try:
272
- update_new_card()
273
+ if gsm_state.lock.locked():
274
+ run_new_thread(update_new_card)
275
+ else:
276
+ update_new_card()
273
277
  except Exception as e:
274
278
  logger.error("Error updating new card, Reason:", e)
275
279
  first_run = False
276
280
  previous_note_ids.update(new_card_ids) # Update the list of known notes
277
281
 
278
-
279
282
  def update_new_card():
280
283
  last_card = get_last_anki_card()
281
284
  if not last_card or not check_tags_for_should_update(last_card):
@@ -301,6 +304,9 @@ def update_new_card():
301
304
  return
302
305
 
303
306
 
307
+
308
+
309
+
304
310
  def sentence_is_same_as_previous(last_card):
305
311
  if not gsm_state.last_mined_line:
306
312
  return False
GameSentenceMiner/gsm.py CHANGED
@@ -35,7 +35,7 @@ try:
35
35
  from GameSentenceMiner.util.communication.websocket import connect_websocket, register_websocket_message_handler, \
36
36
  FunctionName
37
37
  from GameSentenceMiner.util.configuration import *
38
- from GameSentenceMiner.util.ffmpeg import get_audio_and_trim, get_video_timings
38
+ from GameSentenceMiner.util.ffmpeg import get_audio_and_trim, get_video_timings, get_ffmpeg_path
39
39
  from GameSentenceMiner.obs import check_obs_folder_is_correct
40
40
  from GameSentenceMiner.util.text_log import GameLine, get_text_event, get_mined_line, get_all_lines, game_log
41
41
  from GameSentenceMiner.util import *
@@ -573,6 +573,8 @@ def initialize(reloading=False):
573
573
  if is_windows():
574
574
  download_obs_if_needed()
575
575
  download_ffmpeg_if_needed()
576
+ if shutil.which("ffmpeg") is None:
577
+ os.environ["PATH"] += os.pathsep + get_ffmpeg_path()
576
578
  if get_config().obs.enabled:
577
579
  if get_config().obs.open_obs:
578
580
  obs_process = obs.start_obs()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GameSentenceMiner
3
- Version: 2.9.13
3
+ Version: 2.9.14
4
4
  Summary: A tool for mining sentences from games.
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -1,8 +1,8 @@
1
1
  GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- GameSentenceMiner/anki.py,sha256=1DN00SUCSd4adIRrEqirXXf-2jSeFEuYNrr_WB8nlVE,14950
2
+ GameSentenceMiner/anki.py,sha256=tMX6nTVO2PKgXXHM6uh1XaWBYEvZq-6VPhuTSbBrE-Y,15075
3
3
  GameSentenceMiner/config_gui.py,sha256=iAOLD47sQW67kzBcZKSQ0Dwctc1ngZK1lwSVIaLpQPI,83559
4
4
  GameSentenceMiner/gametext.py,sha256=mM-gw1d7c2EEvMUznaAevTQFLswNZavCuxMXhA9pV4g,6251
5
- GameSentenceMiner/gsm.py,sha256=ycv1wMEqTBM919qC5rlr0AVzfPwpYP1yIrbSgfibv4I,29174
5
+ GameSentenceMiner/gsm.py,sha256=hmdgvad7k6mei2M0TywNfdaWt6I_1U6o3MNHJaGTMvQ,29307
6
6
  GameSentenceMiner/obs.py,sha256=O9NYOGu7kwp4flq8LLXp8YJQg0JTZ8qBqiQNQ6u4ku4,14724
7
7
  GameSentenceMiner/vad.py,sha256=Gk_VthD7mDp3-wM_S6bEv8ykGmqzCDbbcRiaEBzAE_o,14835
8
8
  GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -59,9 +59,9 @@ GameSentenceMiner/web/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
59
59
  GameSentenceMiner/web/templates/index.html,sha256=HZKiIjiGJV8PGQ9T2aLDUNSfJn71qOwbYCjbRuSIjpY,213583
60
60
  GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
61
61
  GameSentenceMiner/web/templates/utility.html,sha256=3flZinKNqUJ7pvrZk6xu__v67z44rXnaK7UTZ303R-8,16946
62
- gamesentenceminer-2.9.13.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
63
- gamesentenceminer-2.9.13.dist-info/METADATA,sha256=WyTR-3EvQ2p5mbGLJNGqHTMCeg3hP2mS240XdHrjcK4,7221
64
- gamesentenceminer-2.9.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
65
- gamesentenceminer-2.9.13.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
66
- gamesentenceminer-2.9.13.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
67
- gamesentenceminer-2.9.13.dist-info/RECORD,,
62
+ gamesentenceminer-2.9.14.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
63
+ gamesentenceminer-2.9.14.dist-info/METADATA,sha256=H-FYTe-rnsAEphGMvv9OJthUnHzJPt9kSSHF924m98Y,7221
64
+ gamesentenceminer-2.9.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
65
+ gamesentenceminer-2.9.14.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
66
+ gamesentenceminer-2.9.14.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
67
+ gamesentenceminer-2.9.14.dist-info/RECORD,,