GameSentenceMiner 2.4.6__py3-none-any.whl → 2.4.8__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.
@@ -187,6 +187,10 @@ class ConfigApp:
187
187
  )
188
188
  )
189
189
 
190
+ if config.features.backfill_audio and config.features.full_auto:
191
+ messagebox.showerror("Configuration Error", "Cannot have Full Auto and Backfill mode on at the same time! Note: Backfill is a very niche workflow.")
192
+ return
193
+
190
194
  current_profile = self.profile_combobox.get()
191
195
  prev_config = self.master_config.get_config()
192
196
  if profile_change:
GameSentenceMiner/gsm.py CHANGED
@@ -46,9 +46,28 @@ class VideoToAudioHandler(FileSystemEventHandler):
46
46
  return
47
47
  if event.src_path.endswith(".mkv") or event.src_path.endswith(".mp4"): # Adjust based on your OBS output format
48
48
  logger.info(f"MKV {event.src_path} FOUND, RUNNING LOGIC")
49
- time.sleep(.5) # Small Sleep to allow for replay to be fully written
49
+ self.wait_for_stable_file(event.src_path)
50
50
  self.convert_to_audio(event.src_path)
51
51
 
52
+ @staticmethod
53
+ def wait_for_stable_file(file_path, timeout=10, check_interval=0.5):
54
+ elapsed_time = 0
55
+ last_size = -1
56
+
57
+ while elapsed_time < timeout:
58
+ try:
59
+ current_size = os.path.getsize(file_path)
60
+ if current_size == last_size:
61
+ return True
62
+ last_size = current_size
63
+ time.sleep(check_interval)
64
+ elapsed_time += check_interval
65
+ except Exception as e:
66
+ logger.warning(f"Error checking file size, will still try updating Anki Card!: {e}")
67
+ return False
68
+ logger.warning("File size did not stabilize within the timeout period. Continuing...")
69
+ return False
70
+
52
71
  @staticmethod
53
72
  def convert_to_audio(video_path):
54
73
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: GameSentenceMiner
3
- Version: 2.4.6
3
+ Version: 2.4.8
4
4
  Summary: A tool for mining sentences from games. Update: Multi-Line Mining! Fixed!
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -42,7 +42,7 @@ game we are playing.
42
42
 
43
43
  Short Demo (Watch this first): https://www.youtube.com/watch?v=FeFBL7py6HY
44
44
 
45
- Installation: https://www.youtube.com/watch?v=ybRRB1eIYhk
45
+ Installation: https://youtu.be/h5ksXallc-o
46
46
 
47
47
  ## How Does it Work?
48
48
 
@@ -1,11 +1,11 @@
1
1
  GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  GameSentenceMiner/anki.py,sha256=YSz5gUTsKOdbogwHKtgFM7v7pREjdAwl7A0Wa_CXnKg,10918
3
- GameSentenceMiner/config_gui.py,sha256=-V-GPyHFiN0EI-ZQLXq2yDVfCR_sP7afcjOZKsnGiO8,52312
3
+ GameSentenceMiner/config_gui.py,sha256=6DPJjzP-cHVU9q4j9UP1uF1z0o0z-mq0cuNqjZSIHdo,52566
4
4
  GameSentenceMiner/configuration.py,sha256=mbyIs0h9xh85_ZJkuqTgspkdfl7jeifpvlYofu1e0mE,15001
5
5
  GameSentenceMiner/electron_messaging.py,sha256=fBk9Ipo0jg2OZwYaKe1Qsm05P2ftrdTRGgFYob7ZA-k,139
6
6
  GameSentenceMiner/ffmpeg.py,sha256=vLBmQgkh23BS2vE5u7bli_1_3wFN5cB3VCgrAZ1VAL8,11197
7
7
  GameSentenceMiner/gametext.py,sha256=VjWNdjHwWXWIwNOfYxud7EwIyg7t6zZ3IkmMhh8Vc0c,6819
8
- GameSentenceMiner/gsm.py,sha256=xLzeGYf0S0cNIdGdWN_eU_0JicVbz-yfXK1wyh7OvsA,19448
8
+ GameSentenceMiner/gsm.py,sha256=E9Hpbyzrv8FEFGBs-4Hf60m3sk0ps3OQdvB1n42AhRU,20164
9
9
  GameSentenceMiner/model.py,sha256=oh8VVT8T1UKekbmP6MGNgQ8jIuQ_7Rg4GPzDCn2kJo8,1999
10
10
  GameSentenceMiner/notification.py,sha256=WBaQWoPNhW4XqdPBUmxPBgjk0ngzH_4v9zMQ-XQAKC8,2010
11
11
  GameSentenceMiner/obs.py,sha256=8ImXAVUWa4JdzwcBOEFShlZRZzh1dCvdpD1aEGhQfbU,6566
@@ -19,9 +19,9 @@ GameSentenceMiner/vad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
19
19
  GameSentenceMiner/vad/silero_trim.py,sha256=syDJX_KbFmdyFFtnQqYTD0tICsUCJizYhs-atPgXtxA,1549
20
20
  GameSentenceMiner/vad/vosk_helper.py,sha256=HifeXKbEMrs81ZuuGxS67yAghu8TMXUP6Oan9i9dTxw,5938
21
21
  GameSentenceMiner/vad/whisper_helper.py,sha256=bpR1HVnJRn9H5u8XaHBqBJ6JwIjzqn-Fajps8QmQ4zc,3411
22
- gamesentenceminer-2.4.6.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
23
- gamesentenceminer-2.4.6.dist-info/METADATA,sha256=x6Hhp2vJr1c352cUwyX9p9Os39ym6PHWTS-zl9RowcI,10324
24
- gamesentenceminer-2.4.6.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
25
- gamesentenceminer-2.4.6.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
26
- gamesentenceminer-2.4.6.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
27
- gamesentenceminer-2.4.6.dist-info/RECORD,,
22
+ gamesentenceminer-2.4.8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
23
+ gamesentenceminer-2.4.8.dist-info/METADATA,sha256=7DUjE3Va1_JhrqybWK74OcEKnbWkYftrO9MhLa8qX_w,10309
24
+ gamesentenceminer-2.4.8.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
25
+ gamesentenceminer-2.4.8.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
26
+ gamesentenceminer-2.4.8.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
27
+ gamesentenceminer-2.4.8.dist-info/RECORD,,