Merge branch 'denizsafak:main' into main

This commit is contained in:
Juraj Borza
2025-05-03 19:27:33 +02:00
committed by GitHub
6 changed files with 44 additions and 15 deletions
+14 -3
View File
@@ -1417,7 +1417,6 @@ class abogen(QWidget):
if self.preview_playing:
try:
import pygame
pygame.mixer.music.stop()
except Exception:
pass
@@ -1432,8 +1431,20 @@ class abogen(QWidget):
self.voice_combo.setEnabled(False)
self.btn_voice_formula_mixer.setEnabled(False) # Disable mixer button
self.btn_start.setEnabled(False) # Disable start button during preview
# start loading animation
self.loading_movie.start()
# Start loading animation - ensure signal connection is always active
if hasattr(self, 'loading_movie'):
# Disconnect previous connections to avoid multiple connections
try:
self.loading_movie.frameChanged.disconnect()
except TypeError:
pass # Ignore error if not connected
# Reconnect the signal
self.loading_movie.frameChanged.connect(
lambda: self.btn_preview.setIcon(QIcon(self.loading_movie.currentPixmap()))
)
self.loading_movie.start()
def pipeline_loaded_callback(np_module, kpipeline_class, error):
self._on_pipeline_loaded_for_preview(np_module, kpipeline_class, error)
+3 -4
View File
@@ -66,10 +66,9 @@ def get_version():
# Define config path
def get_user_config_path():
if os.name == "nt":
config_dir = os.path.join(os.environ["APPDATA"], "abogen")
else:
config_dir = os.path.join(os.path.expanduser("~"), ".config", "abogen")
from platformdirs import user_config_dir
# Use platformdirs to get the user configuration directory
config_dir = user_config_dir("abogen", appauthor=False, roaming=True)
os.makedirs(config_dir, exist_ok=True)
return os.path.join(config_dir, "config.json")
+1 -1
View File
@@ -1,6 +1,6 @@
import os
import json
from utils import get_user_config_path, get_resource_path
from utils import get_user_config_path
def _get_profiles_path():