GameSentenceMiner 2.8.31__py3-none-any.whl → 2.8.33__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 +1 -8
- GameSentenceMiner/config_gui.py +1 -1
- GameSentenceMiner/ffmpeg.py +4 -4
- GameSentenceMiner/gsm.py +9 -10
- {gamesentenceminer-2.8.31.dist-info → gamesentenceminer-2.8.33.dist-info}/METADATA +1 -1
- {gamesentenceminer-2.8.31.dist-info → gamesentenceminer-2.8.33.dist-info}/RECORD +10 -10
- {gamesentenceminer-2.8.31.dist-info → gamesentenceminer-2.8.33.dist-info}/WHEEL +0 -0
- {gamesentenceminer-2.8.31.dist-info → gamesentenceminer-2.8.33.dist-info}/entry_points.txt +0 -0
- {gamesentenceminer-2.8.31.dist-info → gamesentenceminer-2.8.33.dist-info}/licenses/LICENSE +0 -0
- {gamesentenceminer-2.8.31.dist-info → gamesentenceminer-2.8.33.dist-info}/top_level.txt +0 -0
GameSentenceMiner/anki.py
CHANGED
@@ -45,14 +45,7 @@ def update_anki_card(last_note: AnkiCard, note=None, audio_path='', video_path='
|
|
45
45
|
if get_config().paths.remove_screenshot:
|
46
46
|
os.remove(screenshot)
|
47
47
|
if get_config().anki.previous_image_field:
|
48
|
-
if
|
49
|
-
try:
|
50
|
-
prev_screenshot = ffmpeg.get_screenshot(video_path, prev_ss_timing)
|
51
|
-
except Exception as e:
|
52
|
-
logger.error(f"Error getting previous screenshot based on VAD, Falling back to previous logic: {e}")
|
53
|
-
prev_screenshot = ffmpeg.get_screenshot(video_path, ffmpeg.get_screenshot_time(video_path, selected_lines[0].prev if selected_lines else game_line.prev))
|
54
|
-
else:
|
55
|
-
prev_screenshot = ffmpeg.get_screenshot(video_path, ffmpeg.get_screenshot_time(video_path, selected_lines[0].prev if selected_lines else game_line.prev))
|
48
|
+
prev_screenshot = ffmpeg.get_screenshot_for_line(video_path, selected_lines[0].prev if selected_lines else game_line.prev)
|
56
49
|
prev_screenshot_in_anki = store_media_file(prev_screenshot)
|
57
50
|
if get_config().paths.remove_screenshot:
|
58
51
|
os.remove(prev_screenshot)
|
GameSentenceMiner/config_gui.py
CHANGED
@@ -777,7 +777,7 @@ class ConfigApp:
|
|
777
777
|
self.seconds_after_line = ttk.Entry(screenshot_frame)
|
778
778
|
self.seconds_after_line.insert(0, str(self.settings.screenshot.seconds_after_line))
|
779
779
|
self.seconds_after_line.grid(row=self.current_row, column=1)
|
780
|
-
self.add_label_and_increment_row(screenshot_frame, "Time in seconds to offset the screenshot based on the Timing setting above (should almost always be positive)", row=self.current_row,
|
780
|
+
self.add_label_and_increment_row(screenshot_frame, "Time in seconds to offset the screenshot based on the Timing setting above (should almost always be positive, can be negative if you use \"middle\")", row=self.current_row,
|
781
781
|
column=2)
|
782
782
|
|
783
783
|
# ttk.Label(screenshot_frame, text="Use Beginning of Line as Screenshot:").grid(row=self.current_row, column=0, sticky='W')
|
GameSentenceMiner/ffmpeg.py
CHANGED
@@ -70,10 +70,10 @@ def get_screenshot_time(video_path, game_line, default_beginning=False, vad_resu
|
|
70
70
|
screenshot_offset = get_config().screenshot.seconds_after_line
|
71
71
|
|
72
72
|
# Calculate screenshot time from the beginning by adding the offset
|
73
|
-
if vad_result and vad_result.success and not doing_multi_line:
|
74
|
-
|
75
|
-
|
76
|
-
|
73
|
+
# if vad_result and vad_result.success and not doing_multi_line:
|
74
|
+
# screenshot_time_from_beginning = line_timestamp_in_video + vad_result.end - 1
|
75
|
+
# logger.info(f"Using VAD result {vad_result} for screenshot time: {screenshot_time_from_beginning} seconds from beginning of replay")
|
76
|
+
if get_config().screenshot.screenshot_timing_setting == "beginning":
|
77
77
|
screenshot_time_from_beginning = line_timestamp_in_video + screenshot_offset
|
78
78
|
logger.info(f"Using 'beginning' setting for screenshot time: {screenshot_time_from_beginning} seconds from beginning of replay")
|
79
79
|
elif get_config().screenshot.screenshot_timing_setting == "middle":
|
GameSentenceMiner/gsm.py
CHANGED
@@ -151,14 +151,14 @@ class VideoToAudioHandler(FileSystemEventHandler):
|
|
151
151
|
logger.info("No SentenceAudio Field in config, skipping audio processing!")
|
152
152
|
|
153
153
|
ss_timing = ffmpeg.get_screenshot_time(video_path, mined_line, vad_result=vad_result, doing_multi_line=bool(selected_lines))
|
154
|
-
prev_ss_timing = 0
|
155
|
-
if get_config().anki.previous_image_field and get_config().vad.do_vad_postprocessing:
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
154
|
+
# prev_ss_timing = 0
|
155
|
+
# if get_config().anki.previous_image_field and get_config().vad.do_vad_postprocessing:
|
156
|
+
# prev_ss_timing = ffmpeg.get_screenshot_time(video_path, mined_line.prev,
|
157
|
+
# vad_result=VideoToAudioHandler.get_audio(game_line=mined_line.prev,
|
158
|
+
# next_line_time=mined_line.time,
|
159
|
+
# video_path=video_path,
|
160
|
+
# anki_card_creation_time=anki_card_creation_time,
|
161
|
+
# timing_only=True) ,doing_multi_line=bool(selected_lines), previous_line=True)
|
162
162
|
|
163
163
|
if get_config().anki.update_anki and last_note:
|
164
164
|
anki.update_anki_card(last_note, note, audio_path=final_audio_output, video_path=video_path,
|
@@ -166,8 +166,7 @@ class VideoToAudioHandler(FileSystemEventHandler):
|
|
166
166
|
should_update_audio=vad_result.success,
|
167
167
|
ss_time=ss_timing,
|
168
168
|
game_line=start_line,
|
169
|
-
selected_lines=selected_lines
|
170
|
-
prev_ss_timing=prev_ss_timing)
|
169
|
+
selected_lines=selected_lines)
|
171
170
|
elif get_config().features.notify_on_update and vad_result.success:
|
172
171
|
notification.send_audio_generated_notification(vad_trimmed_audio)
|
173
172
|
except Exception as e:
|
@@ -1,11 +1,11 @@
|
|
1
1
|
GameSentenceMiner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
GameSentenceMiner/anki.py,sha256=
|
3
|
-
GameSentenceMiner/config_gui.py,sha256=
|
2
|
+
GameSentenceMiner/anki.py,sha256=fu59gdyp1en_yKTK1WOVZX5lwGzGFKvhccXffgkoYlY,14190
|
3
|
+
GameSentenceMiner/config_gui.py,sha256=2klOj2DmHhmvtURp4JjhDJ1vn0hN-uWoUu1lS0xDl3s,74246
|
4
4
|
GameSentenceMiner/configuration.py,sha256=ndnxuQbLfhMruHld-yK3UjWt1DcXlVhaLRZD8l6SJ0E,22562
|
5
5
|
GameSentenceMiner/electron_config.py,sha256=dGcPYCISPehXubYSzsDuI2Gl092MYK0u3bTnkL9Jh1Y,9787
|
6
|
-
GameSentenceMiner/ffmpeg.py,sha256=
|
6
|
+
GameSentenceMiner/ffmpeg.py,sha256=OXjus4JJ2LZKku5SJ1qN89rjZ3jIxbvvAHL-mhGL-5o,14513
|
7
7
|
GameSentenceMiner/gametext.py,sha256=VogQDs-VQ4dorqy8uvoklweeS58r3Th_yP-zn36e0u4,5556
|
8
|
-
GameSentenceMiner/gsm.py,sha256=
|
8
|
+
GameSentenceMiner/gsm.py,sha256=WmVhcC_CGjFmqV75NMMVm9hOiiv-ER4Lu5DUF-6IULo,26012
|
9
9
|
GameSentenceMiner/model.py,sha256=JdnkT4VoPOXmOpRgFdvERZ09c9wLN6tUJxdrKlGZcqo,5305
|
10
10
|
GameSentenceMiner/notification.py,sha256=FY39ChSRK0Y8TQ6lBGsLnpZUFPtFpSy2tweeXVoV7kc,2809
|
11
11
|
GameSentenceMiner/obs.py,sha256=-tzVHejaGDXyERaDrRqrKmbgwT13oJKxTivGwfUij7Y,10284
|
@@ -52,9 +52,9 @@ GameSentenceMiner/web/static/web-app-manifest-512x512.png,sha256=wyqgCWCrLEUxSRX
|
|
52
52
|
GameSentenceMiner/web/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
53
|
GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
|
54
54
|
GameSentenceMiner/web/templates/utility.html,sha256=NUp4Yjs6_j7YeqsM2rcF0LzwS6nXSBUWJDl-k2E8BbM,16270
|
55
|
-
gamesentenceminer-2.8.
|
56
|
-
gamesentenceminer-2.8.
|
57
|
-
gamesentenceminer-2.8.
|
58
|
-
gamesentenceminer-2.8.
|
59
|
-
gamesentenceminer-2.8.
|
60
|
-
gamesentenceminer-2.8.
|
55
|
+
gamesentenceminer-2.8.33.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
56
|
+
gamesentenceminer-2.8.33.dist-info/METADATA,sha256=Tr9Brv6OO1-QMLV_nSZsR1DPy4-ZffwdVqWOX9OjZ9g,7165
|
57
|
+
gamesentenceminer-2.8.33.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
58
|
+
gamesentenceminer-2.8.33.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
|
59
|
+
gamesentenceminer-2.8.33.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
|
60
|
+
gamesentenceminer-2.8.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|