Include video id in default filename format

Add video id to the default output filename template across the downloader and settings UI. The template was changed from "%(title)s_%(resolution)s.%(ext)s" to "%(title)s_%(resolution)s_[%(id)s].%(ext)s" in ytsage_downloader.py and ytsage_dialogs_settings.py (including placeholder and reset behavior). This helps avoid filename collisions and makes downloaded files easier to identify.
This commit is contained in:
oop7
2026-04-19 19:20:56 +02:00
parent a51d8092a8
commit ab7d77800a
2 changed files with 4 additions and 4 deletions
@@ -387,18 +387,18 @@ class DownloadSettingsDialog(QDialog):
filename_layout = QVBoxLayout()
# Load current filename format from ConfigManager
self.filename_format_value = ConfigManager.get("filename_format") or "%(title)s_%(resolution)s.%(ext)s"
self.filename_format_value = ConfigManager.get("filename_format") or "%(title)s_%(resolution)s_[%(id)s].%(ext)s"
# Input and Reset Button Layout
filename_input_layout = QHBoxLayout()
self.filename_format_input = QLineEdit(self.filename_format_value)
self.filename_format_input.setPlaceholderText("%(title)s_%(resolution)s.%(ext)s")
self.filename_format_input.setPlaceholderText("%(title)s_%(resolution)s_[%(id)s].%(ext)s")
filename_input_layout.addWidget(self.filename_format_input)
self.reset_format_button = QPushButton(_("buttons.reset"))
self.reset_format_button.setFixedWidth(70)
self.reset_format_button.clicked.connect(lambda: self.filename_format_input.setText("%(title)s_%(resolution)s.%(ext)s"))
self.reset_format_button.clicked.connect(lambda: self.filename_format_input.setText("%(title)s_%(resolution)s_[%(id)s].%(ext)s"))
filename_input_layout.addWidget(self.reset_format_button)
filename_layout.addLayout(filename_input_layout)