Add configurable output filename format

Introduce a new filename_format setting and UI to control yt-dlp output templates. ConfigManager now includes a default filename_format (%(title)s_%(resolution)s.%(ext)s). The DownloadSettingsDialog exposes a text input and help text for the format and saves the value to ConfigManager. DownloadThread now accepts a filename_format argument and uses it when building output templates for single videos and playlists. YTSageApp reads the config and passes the filename format into the download thread. Added corresponding English language strings.
This commit is contained in:
oop7
2026-02-07 15:28:06 +02:00
parent a65f0702ac
commit ed1469898c
5 changed files with 42 additions and 2 deletions
+4
View File
@@ -678,6 +678,9 @@ class YTSageApp(QMainWindow, FormatTableMixin, VideoInfoMixin, AnalysisMixin):
logger.warning(f"Thumbnail download failed: {e}", exc_info=True)
# Optionally inform the user, but don't stop the main download
# Get filename format from config
filename_format = ConfigManager.get("filename_format")
# Create download thread with resolution in output template
self.download_thread = DownloadThread(
url=url,
@@ -705,6 +708,7 @@ class YTSageApp(QMainWindow, FormatTableMixin, VideoInfoMixin, AnalysisMixin):
preferred_output_format=self.preferred_output_format, # Pass preferred format
force_audio_format=self.force_audio_format, # Pass force audio format setting
preferred_audio_format=self.preferred_audio_format, # Pass preferred audio format
filename_format=filename_format, # Pass the filename format
)
# Connect signals