Commit Graph

86 Commits

Author SHA1 Message Date
oop7 938cc9be46 Bump version to 5.1.0
Update package version from 5.0.10b to 5.1.0 in pyproject.toml and ytsage/__init__.py to prepare for the 5.1.0 release.
2026-05-14 15:54:07 +03:00
oop7 9fd09cd0d0 Handle playlist items as completed on partial errors
For playlist downloads, treat an item as completed if a file was created even when the downloader returned a non-zero code. Emit 100% progress for such cases and update the status to "download.completed (with some errors)" when return_code != 0, otherwise keep the normal completed status. This avoids reporting false failures for playlist items that produced output despite errors.
2026-05-14 13:47:05 +03:00
oop7 99ba5d6d8a Ignore playlist errors; normalize version cache
When downloading playlists, add --ignore-errors and --no-abort-on-error so a single failure won't stop the entire playlist download. Also normalize values stored in the version cache: coerce version_info to a string (or empty string) and path to a string or None to ensure consistent types when reading/writing cached tool metadata.
2026-05-14 12:37:56 +03:00
oop7 ba07a3300c Bump version to 5.0.10b
Update project version from 5.0.9b to 5.0.10b in pyproject.toml and ytsage/__init__.py to prepare a new beta release.
2026-05-01 22:51:06 +03:00
oop7 0d5cbb2df1 Write auto-subs only if selected; show count
Downloader: add detection for "Auto-generated" subtitle selection and only append --write-auto-subs when an auto-generated subtitle is explicitly chosen (prevents always enabling the flag when any subtitles are requested). GUI: update subtitle label to display the number of selected subtitles when >0, falling back to the zero-selected message otherwise. Small UX and behavior fixes in DownloadThread and AnalysisMixin.
2026-05-01 16:49:58 +03:00
oop7 abef0d8a6d Strip playlist_index placeholder for single files
When building the output template for single-file downloads, remove any playlist-specific preamble (e.g. '%(playlist_index)s - ') from filename_part. Adds a regex-based substitution to clean up leftover playlist_index placeholders so single downloads don't get playlist-style prefixes in their filenames.
2026-05-01 16:29:28 +03:00
oop7 abec69fb84 Include index and formatted durations in exports
Enhance playlist export output for Text and CSV formats. Text files now include a numeric index, a title fallback ("Video N"), and a human-readable duration ([H:MM:SS] or [MM:SS]) when available before the URL. CSV export adds a "Playlist Index" column and writes a formatted title with index and duration. Duration parsing is protected against non-integer values. M3U and JSON export behavior unchanged.
2026-05-01 14:23:29 +03:00
oop7 d2f96baf63 Bump version to 5.0.9b
Update package version from 5.0.7b to 5.0.9b in pyproject.toml and ytsage/__init__.py to reflect the new release.
2026-04-28 13:37:31 +03:00
oop7 e78b634bee Add remember_settings and private_video keys
Add two new localization keys across multiple language files: "remember_settings" (cookie dialog) and "private_video" (download/error message) to inform users about remembering cookie settings and private videos. Also fix minor formatting in en.json (split combined line for open_folder/save_playlist/reset). Updated locale files: ar, de, en, es, fr, hi, id, it, ja, pl, pt, ru, tr, zh.
2026-04-28 13:31:07 +03:00
oop7 8dc0991619 Persist cookie settings across sessions
Restore cookie configuration on startup when previously active and the user opted to remember them. If config indicates a file source and the path exists, set cookie_file_path; if browser source, set browser_cookies_option. Treat missing "cookie_remember" as true by default. If the user did not opt to remember cookies, reset cookie_active to false. Added logging for restored settings and initialization state.
2026-04-28 13:30:13 +03:00
oop7 4ae78b830d Add 'Remember Cookie Settings' checkbox
Introduce a "Remember Cookie Settings" QCheckBox to the cookies UI (label uses gettext key "cookies.remember_settings"). The control defaults to True when no prior setting exists and applies custom styling for the indicator and text. Its toggled signal is wired to ConfigManager.set("cookie_remember", checked) so the preference is saved immediately (avoiding dependence on an Apply button), and the value is also saved when the dialog persists other cookie settings. Uses the "cookie_remember" config key for storage.
2026-04-28 13:29:43 +03:00
oop7 5bbecf1e1d Detect private/sign-in yt-dlp errors
Update AnalysisThread error handling to detect yt-dlp stderr containing "Private video" or "Sign in". For those cases, emit a localized errors.private_video message and log a specific private-video error; otherwise preserve the existing generic ytdlp_failed behavior. Playlist visibility signals and early return remain unchanged.
2026-04-28 13:29:26 +03:00
oop7 fe0f8241ff Improve playlist format selection and resolution
When downloading playlists, avoid reusing a specific format_id from the first item (which can fail for subsequent videos). For audio-only playlists, use yt-dlp's bestaudio fallback; for video playlists, respect a provided resolution by extracting the height and applying -S res:<height>, otherwise fall back to bestvideo+bestaudio/best. Invalid resolution strings are caught and logged, and revert to the dynamic best-quality fallback.
2026-04-28 12:55:46 +03:00
oop7 bb461898e4 Update translations across multiple locales
Update and improve translations for multiple language files (ar, de, es, fr, hi, id, it, ja, pl, pt, ru, tr, zh). Key changes include localized strings for playlist saving ("Save Playlist As" -> localized), save/result/error messages, concurrent connections and help text, default selection/settings (video quality and subtitle language), and various wording/typo fixes. Also add/translate FFmpeg installation and yt-dlp setup messages in Turkish and Chinese. No functional code changes.
2026-04-25 17:42:36 +03:00
oop7 a2e11eec06 Update French translations
Translate several UI strings in ytsage/languages/fr.json from English to French: update `save_playlist`, `filter_playlist_placeholder`, and a group of settings strings (`concurrent_fragments`, `concurrent_fragments_help`, `defaults_settings`, `default_video_quality`, `default_subtitle_language`, `defaults_help`) to provide correct French localization and improve consistency.
2026-04-25 17:40:49 +03:00
oop7 9856dbf301 Update Spanish and Hindi translations
Improve localization by updating translations in ytsage/languages/es.json and ytsage/languages/hi.json. Spanish fixes provide full translations for interface help text, restart notice, playlist/save labels, dialog placeholders, and playlist save messages. Hindi adds translated strings for concurrent connections, related help text, and default selection settings for video quality and subtitles.
2026-04-25 17:40:24 +03:00
oop7 3d06c4dba6 Update German and Hindi translations
Translate several UI strings in ytsage/languages for German (de.json) and Hindi (hi.json). Changes include localized labels for saving playlists and filtering videos, dialog placeholders, and various settings text (e.g. concurrent connections and default selection help in German). Hindi updates add translated playlist save dialog messages and related UI strings.
2026-04-25 17:39:52 +03:00
oop7 d8c3ce8fa1 Add new i18n keys to language files
Add new localization keys across multiple ytsage language JSONs. Common addition: "filter_playlist_placeholder" added to most languages. Spanish, Turkish and Chinese receive several new strings for custom commands, proxy settings, FFmpeg installation messages, history loading, time/placeholders and validation messages. Also ensure files end with newline. Files modified: ar, de, es, fr, hi, id, it, ja, pl, pt, ru, tr, zh.
2026-04-25 10:58:43 +03:00
oop7 d19ac96ff7 Bump package version to 5.0.7b
Update project version in pyproject.toml and ytsage/__init__.py from 5.0.5b to 5.0.7b to mark the new release.
2026-04-25 10:54:08 +03:00
oop7 c9217fccb7 Handle None file_size in history delegate
Replace entry.get('file_size', 0) with entry.get('file_size') or 0 in HistoryDelegate (ytsage_dialogs_history.py) to treat None as 0. This prevents TypeError when comparing None > 0 and ensures file size formatting/display only occurs for positive sizes.
2026-04-25 10:40:38 +03:00
oop7 57f5450725 Add save_playlist key to language files
Add a new "save_playlist" entry (placeholder "Save Playlist As") to multiple locale JSON files (ar, de, es, fr, hi, id, it, ja, pl, pt, ru, tr, zh) to provide a translation key for saving playlists. Also adds the required trailing commas when inserting the new entries.
2026-04-25 10:39:00 +03:00
oop7 405ae07cac Add i18n entries for defaults and playlist save
Add new localization keys across multiple languages to support default selection settings and playlist saving UI. New keys include defaults_settings, default_video_quality, default_subtitle_language, defaults_help, and playlist save messages (save_as, save_success_title, saved_successfully, save_error_title, no_videos_to_save, save_error_msg). Files updated: ar, de, es, fr, hi, id, it, ja, pl, pt, ru, tr, zh.
2026-04-25 10:37:40 +03:00
oop7 3b6ac7ce81 Add playlist save and default selection strings
Update English locale with new UI strings for playlist saving and default selections. Adds 'save_playlist' and related save messages (save_as, save_success_title, saved_successfully, save_error_title, no_videos_to_save, save_error_msg), adds default selection settings keys (defaults_settings, default_video_quality, default_subtitle_language, defaults_help), and documents the %(playlist_index)s variable in filename_format_help. Also minor formatting cleanup in the file.
2026-04-25 10:33:10 +03:00
oop7 cf4c4e37c8 Add 'Save Playlist' button and save dialog
Introduce a Save Playlist UI flow: import QFileDialog, group playlist action buttons into a horizontal layout, add a new "Save Playlist As" button with styling and visibility control, and connect its click to a new save_playlist_to_file method. The new method prompts for a save location and supports saving playlist_entries in TXT, M3U, CSV, or JSON formats, shows success/error message boxes, and logs exceptions. Also wire the existing playlist visibility signal to control the save button and adjust layout placement for the playlist buttons.
2026-04-25 10:32:59 +03:00
oop7 fb209351f2 Auto-select default video quality in formats
After populating the format table, read default_video_quality from ConfigManager and attempt to auto-select a matching video format (by resolution/height). If a matching video format is found it is checked and handle_checkbox_click is invoked to trigger selection side-effects; if not, the first (highest-quality) format is selected as a fallback. Existing visibility filtering via filter_formats is still applied afterward.
2026-04-25 10:32:49 +03:00
oop7 6eb12043e3 Add default video quality & subtitles settings
Introduce a "Default Selection Settings" group in the Download Settings dialog to let users specify a default video resolution (height) and default subtitle language(s). Adds labeled QLineEdit inputs with placeholders and explanatory help text, uses localized strings for labels, and persists values to ConfigManager under keys "default_video_quality" and "default_subtitle_language" when saving.
2026-04-25 10:32:35 +03:00
oop7 717e9b40ae Preselect default subtitles from config
Load user's default_subtitle_language from ConfigManager and preselect matching manual or auto-generated subtitles on analysis load. Handles comma-separated strings, checks against available_subtitles and available_automatic_subtitles, and updates the selected subtitles list. Attempts to update the UI label and button state (with style refresh) inside a try/except to avoid errors during initialization.
2026-04-25 10:32:20 +03:00
oop7 ab7d77800a 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.
2026-04-19 19:20:56 +02:00
oop7 a51d8092a8 Include video id in default filename format
Update default filename_format to append the video id as _[%(id)s] before the extension, improving uniqueness of generated filenames and preventing collisions when multiple videos share the same title and resolution.
2026-04-19 18:11:19 +02:00
oop7 00fc685e88 Bump version to 5.0.5b
Prepare a new beta release by updating the package version. Sync version from 5.0.4b to 5.0.5b in pyproject.toml and ytsage/__init__.py.
2026-04-10 17:19:44 +02:00
oop7 9b085aa547 Prefix playlist formats with '≤' and read table
Format table: when in playlist mode and the format has a video codec, prefix the quality and (when available) resolution with "≤ " to indicate an upper-bound. Resolution is only prefixed if it's not "N/A".

Main UI: replace the old checkbox-list lookup with scanning the format_table rows to find the checked checkbox widget, pick the correct resolution column depending on playlist mode, strip any leading "≤ " and use that as the selected resolution. This fixes resolution selection for playlist entries and ensures the displayed "≤" semantics are handled when extracting values.
2026-04-10 17:10:58 +02:00
oop7 71a68d3947 Use smaller dimension for resolution height
Previously the code assumed the height was always the second value in the "WxH" resolution string. This change splits the resolution into parts, verifies there are two components, and uses the smaller dimension (min) as the height to correctly classify vertical videos. Also avoids potential index errors when the resolution string is malformed.
2026-04-10 15:10:00 +02:00
oop7 e86536d585 Add concurrent connections i18n keys
Add new i18n keys "concurrent_fragments" and "concurrent_fragments_help" to multiple language JSON files (ar, de, en, es, fr, hi, id, it, ja, pl, pt, ru, tr, zh). These expose a UI option for the number of concurrent connections per download with a help string (default: 1, warns about throttling/temporary blocks). Strings were added in English across locales and may need translation.
2026-04-09 18:27:50 +02:00
oop7 7acb3d0853 Add default concurrent_fragments setting
Introduce a new config key 'concurrent_fragments' with default value 1 in ConfigManager defaults. This exposes a setting to control the number of concurrent fragment downloads/processing, preserving single-fragment behavior unless overridden by user configuration.
2026-04-09 18:27:33 +02:00
oop7 47dafe565f Pass concurrent_fragments to DownloadThread
Read concurrent_fragments from ConfigManager (defaulting to 1) and forward it into the DownloadThread constructor so the download fragment concurrency setting is propagated to the downloader.
2026-04-09 18:27:23 +02:00
oop7 2495c77d3c Support concurrent fragments and emit finished
Add a concurrent_fragments parameter to DownloadThread (default 1) and store it as an instance attribute. When building the yt-dlp command, include a -N <concurrent_fragments> option and log the concurrent connections. Also emit finished_signal upon cancellation and on error paths to ensure the UI is notified of thread completion. Minor comment/logging clarifications added around command construction.
2026-04-09 18:27:14 +02:00
oop7 fda6a4059d Add concurrent connections setting to dialog
Add a "Concurrent Connections" section to DownloadSettingsDialog with a QComboBox (1–20) and help text; initialize from ConfigManager("concurrent_fragments"). Introduce get_concurrent_fragments() to return the chosen value (with a safe fallback to 1) and persist the setting on dialog accept. Uses localized labels and minor styling for the help label.
2026-04-09 18:26:57 +02:00
oop7 99f1adf8eb Bump package version to 5.0.4b
Update package version from 5.0.2b to 5.0.4b. Changed version in pyproject.toml and __version__ in ytsage/__init__.py to prepare for the new release.
2026-04-09 14:50:01 +02:00
oop7 437344695d Add UI tab labels to translation files
Add "tab_general", "tab_format", and "tab_file" entries to multiple ytsage/languages/*.json files to provide localized labels for the UI tabs (General, Format, File). Also include a minor formatting/newline fix in en.json.
2026-03-21 16:26:41 +02:00
oop7 f66ea09ba6 Refactor settings dialog into tabs and restyle
Reorganize the Download Settings dialog into a SmoothTabWidget with three tabs (General, Format, File) and move existing group sections into corresponding tab layouts. Import QWidget and SmoothTabWidget, increase dialog minimum width from 450 to 550, and add stretches for better layout spacing. Overhaul the dialog stylesheet to restyle tabs, frames, group boxes, checkboxes, radio buttons, combo boxes and item views (borders, paddings, colors, radii, hover/selected states). Also style OK/Cancel buttons to match the Custom Options dialog. These changes improve the dialog's visual consistency and UX while preserving existing settings controls and behavior.
2026-03-21 16:21:07 +02:00
oop7 62b8ede273 Add audio normalization docs and translations
Document Audio Normalization (EBU R128) in README and translated READMEs, and add corresponding localization keys and help text in ytsage language files. Updates include README.md, readme-translations (ar,de,es,fr,hi,id,it,ja,pl,pt,ru,tr,zh) and ytsage/languages JSON files to explain the feature and note that normalization requires re-encoding and forcing a specific audio format (e.g. MP3 or M4A).
2026-03-21 15:21:40 +02:00
oop7 b048f8ce09 Add audio normalization option and support
Introduce an "audio_normalization" option across the app and implement normalization for audio-only downloads. Updates include: add config default (ConfigManager), new language strings, settings UI checkbox + help text and logic to auto-enable force-audio-format when normalization is enabled, and persist the setting. Pass the setting from main app to DownloadThread, and in the downloader force re-encoding to mp3 when necessary and append --postprocessor-args ExtractAudio:-af loudnorm=... to apply EBU R128 normalization. This ensures normalization works reliably (avoids ffmpeg stream-copy errors) and keeps the behavior scoped to ExtractAudio postprocessor.
2026-03-21 15:08:48 +02:00
oop7 fff674a0b8 Add check_app_updates key to locales
Add a new "check_app_updates" translation string to multiple language files so the UI can display the option to check for YTSage updates at startup. Updated languages: ar, de, es, fr, hi, id, it, ja, pl, pt, ru, tr, zh.
2026-03-19 14:49:37 +02:00
oop7 4a16aad2ac Add check_app_updates setting and UI
Introduce a new "check_app_updates" configuration (default: true) to allow users to enable/disable automatic YTSage update checks. Adds a styled checkbox to the Updater tab with getter, loads the setting (defaults to enabled for older configs), and saves it from the custom options dialog. The main update check now respects this setting and will skip checking when disabled. Also include English localization entries for the new UI strings.
2026-03-19 14:45:56 +02:00
oop7 67dc1c83f2 Bump package version to 5.0.2b
Update ytsage.__version__ from 5.0.1b to 5.0.2b to mark the next beta release.
2026-03-19 14:34:37 +02:00
oop7 64c9cf84da Bump version to 5.0.1b
Update project version from 5.0.0b5 to 5.0.1b in pyproject.toml and ytsage/__init__.py to reflect a new beta release.
2026-03-12 11:24:45 +02:00
oop7 9afca46c5d 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.
2026-03-12 11:10:10 +02:00
oop7 a98dad0a33 Simplify link styling in About dialog
Update AboutDialog link markup to remove explicit font-size and font-weight styles and to unify link color. The author and repo links no longer set font-size, and the sponsor link color was changed from #ea4aaa to #c90000 (and its font-size/weight removed) for consistent appearance across links.
2026-03-03 18:00:03 +02:00
oop7 4775f827a0 Add sponsor link to About dialog
Add a styled '❤️ Sponsor' GitHub Sponsors link to the About dialog (ytsage_dialogs_base.py). The change creates a QLabel with an external href to the sponsor page, enables openExternalLinks, and appends it to the info layout so the About dialog displays a sponsor call-to-action.
2026-03-03 17:45:21 +02:00
oop7 6b6394b3b6 Zero-pad PyPI version to match GitHub tags
Normalize PyPI's version string (e.g. "2026.2.21") to the zero-padded GitHub tag format (e.g. "2026.02.21") before building the update target. The code splits a three-part version and pads the month/day components with two digits so stable@<tag> matches yt-dlp GitHub tagging.
2026-02-26 13:02:54 +02:00