Add generic-mode URL validation and UI

Introduce a "generic_mode" option to allow validating/downloading from non-YouTube sites and wire it through the UI, config, and validation logic. Key changes:

- Add generic_mode default to ConfigManager and persist setting from DownloadSettingsDialog (checkbox + help text).
- Extend validate_video_url to accept a generic_mode flag and allow any http/https URL with a domain when enabled; pass this flag from Analysis and Download flows.
- Update YTSageApp to load/save generic_mode, update URL placeholder and settings tooltip behavior, and refresh tooltip when settings change.
- Improve robustness in FormatTableMixin: handle None/incorrect types for format_note, abr, resolution, ext, and codec values to avoid type errors and ensure consistent display.
- Add localization entries for generic mode, placeholder, and related help text across multiple language files and update the in-app default localization strings.

These changes enable broader site support via yt-dlp while hardening UI format handling and keeping user settings persistent.
This commit is contained in:
oop7
2026-03-12 11:10:10 +02:00
parent a98dad0a33
commit 9afca46c5d
21 changed files with 152 additions and 30 deletions
+4
View File
@@ -274,6 +274,9 @@
"browse": "ब्राउज़ करें...",
"speed_limit": "गति सीमा",
"speed_limit_placeholder": "कोई नहीं",
"generic_mode": "जेनेरिक मोड",
"enable_generic_mode": "जेनेरिक मोड सक्षम करें (गैर-YouTube साइटों के लिए समर्थन)",
"generic_mode_help": "Dailymotion, CBC Gem और yt-dlp द्वारा समर्थित अन्य साइटों से डाउनलोड की अनुमति देता है।",
"auto_update_ytdlp": "yt-dlp स्वचालित अपडेट",
"enable_auto_updates": "yt-dlp स्वचालित अपडेट सक्षम करें",
"update_frequency": "अपडेट आवृत्ति:",
@@ -337,6 +340,7 @@
},
"main_ui": {
"url_placeholder": "YouTube वीडियो या प्लेलिस्ट URL दर्ज करें",
"url_placeholder_generic": "किसी भी समर्थित साइट से वीडियो या प्लेलिस्ट URL दर्ज करें",
"merge_subtitles": "उपशीर्षक मर्ज करें",
"save_thumbnail": "थंबनेल सेव करें",
"save_description": "विवरण सेव करें",