refactor(shutdown): move shutdown logic in one place

This commit is contained in:
Artem Akymenko
2026-07-12 20:19:33 +03:00
parent c380a58496
commit b7026a666d
8 changed files with 191 additions and 42 deletions
+4
View File
@@ -2397,6 +2397,10 @@ class ConversionThread(QThread):
self.cancel_requested = True
self.should_cancel = True
self.waiting_for_user_input = False
# Clear voice cache (instance and module-level)
self.voice_cache.clear()
from abogen.voice_cache import clear_voice_cache
clear_voice_cache()
# Terminate subprocess if running
if self.process:
try: