Commit Graph

465 Commits

Author SHA1 Message Date
oop7 04e043c689 Add app update strings to translations
Add 'app_updates_title' and 'check_beta_updates' translation keys to language files (ar, de, es, fr, hi, id, it, ja, pl, pt, ru, tr, zh). These localized strings support the app updates settings UI (including an option to receive beta updates) and keep translations consistent with the existing auto-update-related entries.
2026-02-08 17:43:24 +02:00
oop7 d250c1b05f Add opt-in beta update UI and checks
Introduce an opt-in beta updates feature: add a styled "Receive Beta Updates" checkbox in the Updater UI with i18n strings, load/save logic in the custom options dialog, and a default config key (check_beta_updates=false).

Add _fetch_github_beta_version to the update thread to query GitHub releases (selecting the highest tag) and emit update_available for newer beta builds. When beta checking is enabled, the thread will perform the GitHub beta check and return early to avoid conflicting with the PyPI check. This enables users to opt into preview releases safely.
2026-02-08 17:41:13 +02:00
oop7 d2bc08e937 Bump package version to 5.0.0b4
Update __version__ in ytsage/__init__.py from 5.0.0b3 to 5.0.0b4 to mark the next beta release.
2026-02-07 19:15:07 +02:00
oop7 3d5dfd6d48 Add Inno Setup installers and build step
Add Inno Setup compilation to the Windows CI: the workflow now installs Inno Setup via choco, adjusts PATH, and runs iscc to compile two installers (standard and -ffmpeg) using /DMyAppVersion,/DMyAppExeName and /DSourceDir, placing outputs into repo/artifacts and failing the job on non-zero exit. Also add two new Inno Setup scripts in setup-scripts/: Setup-windows.iss and Setup-windows-ffmpeg.iss. The scripts include metadata, multi-language support, file/icon/registry/run entries, and Pascal code to create or update the user's ytsage_config.json language setting; the -ffmpeg script adds an optional task to append the app folder to the user's PATH.
2026-02-07 19:13:47 +02:00
oop7 9f1381d27e Update format table directly from analysis
Stop storing result_data["all_formats"] on the mixin and instead call update_format_table(result_data["all_formats"]). Replaces the previous filter_formats() call so the format table is populated directly from the fresh analysis result, avoiding reliance on a separate self.all_formats attribute.
2026-02-07 19:01:37 +02:00
oop7 c8ecdf8eb6 Fix PyPI badge link and add platform badge
Update README badges: change the PyPI badge URL to the official PyPI project page (pypi.org) and add a 'Supported Platforms' badge indicating cross-platform support (linked to releases). This improves badge accuracy and highlights platform compatibility in the project README.
2026-02-07 16:03:39 +02:00
oop7 351504ade9 Add reset and filename_format translations
Add a "reset" button label and new "filename_format" + "filename_format_help" entries to multiple locale JSON files (ar, de, es, fr, hi, id, it, ja, pl, pt, ru, tr, zh). The help text documents supported yt-dlp output template variables (%(title)s, %(uploader)s, %(upload_date)s, %(resolution)s, %(id)s, %(ext)s) so the UI can accept a custom output filename format.
2026-02-07 15:55:10 +02:00
oop7 40069c039a Clarify README UI labels
Update README text to reflect UI label changes: 'Force Output Format' now points to 'Download Settings → Output Format Settings', and 'Download History' instructs users to click the 'History' button. Improves accuracy of guidance in the docs.
2026-02-07 15:48:11 +02:00
oop7 b1d0034537 Increase help label font size to 11px
Bump help text font-size from 10px to 11px in DownloadSettingsDialog for improved readability. Updated style for force format, audio format, and filename format help labels in ytsage/gui/ytsage_gui_dialogs/ytsage_dialogs_settings.py.
2026-02-07 15:40:37 +02:00
oop7 1fbc3a43c2 Add Reset button for filename format
Add a Reset button next to the filename format input so users can restore the default pattern. The filename input and reset button are grouped in a QHBoxLayout; the button is fixed width (70) and sets the field back to the default %(title)s_%(resolution)s.%(ext)s. Also add the corresponding i18n key (buttons.reset -> "Reset") to en.json.
2026-02-07 15:37:26 +02:00
oop7 656a77f943 Document Output Filename Format option
Add a README entry describing the new Output Filename Format setting under Download Settings, showing example variables such as %(title)s, %(uploader)s, and %(resolution)s so users can customize downloaded filenames.
2026-02-07 15:29:42 +02:00
oop7 ed1469898c 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.
2026-02-07 15:28:06 +02:00
oop7 a65f0702ac Bump version to 5.0.0b3
Update package version in ytsage/__init__.py from 5.0.0b2 to 5.0.0b3 to reflect a new beta release.
2026-02-03 19:32:39 +02:00
oop7 cd9e410ea3 Simplify analysis status messages in locales
Standardize and simplify analysis/status strings across multiple language files by removing percent-based prefixes and verbose phrasing, adding concise messages with trailing ellipses. This updates localization for ar, de, es, fr, hi, id, it, ja, pl, pt, ru, tr, and zh (ytsage/languages/*.json) to make progress messages cleaner and consistent for both regular and ytdlp-related steps.
2026-02-03 19:20:41 +02:00
oop7 e86704c5cd Simplify analyzing status messages
Update English UI strings in ytsage/languages/en.json to remove progress percentages and the repeated "Analyzing" prefix, replacing them with concise action messages (e.g., "Extracting basic info...", "Loading thumbnail..."). This makes status messages shorter and more consistent across regular and ytdlp-related entries without changing functionality.
2026-02-03 19:17:44 +02:00
oop7 49dde84481 Add progress signals and fake progress timer
Emit progress updates during URL analysis and simulate gradual progress for long-running yt-dlp operations. Added QTimer import and a progress_update Signal on AnalysisThread, with emits at multiple analysis milestones (e.g. 15, 30, 60, 70, 85, 90, 92, 95, 100). In AnalysisMixin introduced _analysis_timer and _fake_progress, connected thread progress to _handle_analysis_progress, and implemented a _update_fake_progress timer that slowly advances the progress bar between real updates. Timers are stopped on real progress, completion or error and the UI progress is reset appropriately to improve UX during long extraction steps.
2026-02-03 19:17:30 +02:00
oop7 0b0e3add3c Add Deno integration check and system info thread
Introduce check_ytdlp_deno_integration() in ytsage_yt_dlp.py to detect Deno integration by running `yt-dlp --verbose` and scanning debug output for JS runtimes containing "deno" (with timeout and logging/fallback).

Add SystemInfoThread (QThread) in ytsage_dialogs_base.py to collect yt-dlp, ffmpeg and deno presence, versions, paths, cache timestamps and integration status in the background, emitting the gathered info via info_ready. AboutDialog now starts the thread in update_system_info() and populates the UI asynchronously via _populate_system_info(), showing a small "+ yt-dlp" integration indicator next to the Deno status when detected. Refactors usage of version/cache lookups to use the thread-provided info dictionary.
2026-02-03 18:51:05 +02:00
oop7 4f5e30e6cf Stream Deno upgrade output and add GUI thread
Add streaming progress support to Deno upgrades and hook it into the GUI. upgrade_deno() now accepts an optional progress_callback and uses subprocess.Popen to read stdout line-by-line (line-buffered, utf-8, errors replaced), collecting output and invoking the callback as lines arrive. Added DenoUpdateThread (QThread) with finished/progress/error signals and replaced the previous background thread usage in the updater UI with this QThread. GUI slots strip ANSI escapes, truncate long messages, and update status text; buttons are re-enabled on finish/error. Improved logging and error handling for upgrade failures.
2026-02-03 18:41:39 +02:00
oop7 b776b3efa9 Keep QtDBus and related plugins in macOS build
Add PySide6.QtDBus to the list of included PySide6 modules and stop removing DBus-related artifacts during the macOS packaging step. The changes remove deletions of the platforminputcontexts plugin and libqpdf/libqsvg/libqsvgicon files, and remove QtDBus from the list of Qt modules treated as bloat. This preserves D-Bus support and related SVG/PDF rendering plugins required at runtime.
2026-02-03 17:41:54 +02:00
oop7 030b37c505 Adjust PySide6 components and plugin cleanup
Add PySide6.QtDBus and PySide6.QtSvg to the list of required modules and remove PySide6.QtSvg from the secondary module list. Stop removing the svg plugin, platforminputcontexts and svg-related image/icon libraries during the cleanup pass (only libqpdf.so is still removed). These changes ensure QtSvg and D-Bus components are preserved in the Linux build and prevent stripping SVG-related functionality.
2026-02-03 17:19:44 +02:00
oop7 cfccbceb8e Adjust AppImage AppDir layout and AppRun script
Update the Linux CI AppImage build to copy the cx_Freeze output directly into AppDir root (so 'lib' sits next to the 'ytsage' binary) to avoid ModuleNotFoundError: encodings. Fix the .desktop Exec path, add .DirIcon, and replace the previous symlink with an AppRun script that sets LD_LIBRARY_PATH and execs the bundled binary.
2026-02-03 17:01:25 +02:00
oop7 ad63cdcca1 Build AppImage manually in CI workflow
Replace the cx_Freeze bdist_appimage step with an explicit manual AppImage build to avoid cx_Freeze rebuilding and untrimming artifacts. The workflow now downloads appimagetool, prepares an AppDir (AppDir/usr/bin), copies the trimmed build contents (preserving cx_Freeze relative paths), installs desktop/icon metadata, creates an AppRun symlink, and runs appimagetool with ARCH=x86_64 and --appimage-extract-and-run to avoid FUSE issues in CI. The rest of the job (e.g. RPM build) remains unchanged.
2026-02-03 16:44:51 +02:00
oop7 5d9054154c Manually create DMG and ZIP artifacts
Remove the separate bdist_dmg build step and instead package the generated .app in-place: create a .app.zip and build a UDZO .dmg using a temporary dmg_stage (copy .app, add Applications symlink, run hdiutil). Also remove the previous fallback that searched for prebuilt DMGs and change missing .app handling to error+exit. Artifacts are written to artifacts/YTSage-v${version}-${ARCH_SUFFIX}.{app.zip,dmg}.
2026-02-03 16:28:27 +02:00
oop7 ac11cbd7bb Simplify macOS .app lib trimming workflow
Replace complex multi-dir detection with a single find+while loop to identify library dirs and verify Python lib layout (asyncio/PySide6/ytsage). Consolidate cleanup steps: recursively remove PySide6 translations, normalize plugin path detection and remove specific plugin folders/files via find, and simplify removal of unwanted Qt modules using broader find patterns. Remove some verbose checks and add a final sanity listing of remaining lib contents. These changes make the trimming more robust to different .app layouts and reduce duplicate logic.
2026-02-03 16:14:59 +02:00
oop7 c11a4a0280 Enhance macOS build lib cleanup
Update the macOS build workflow to robustly locate and clean multiple library directories inside the .app bundle. Instead of a single lib path, the script now finds all 'lib' dirs containing PySide6 or ytsage and iterates over them. Cleanup expanded to handle alternate PySide6 paths (PySide6/Qt/translations, PySide6/Qt/plugins), more plugin/imageformat variants (.dylib/.so), additional Qt library name patterns (Qt6*, framework-style names) and Qt6DBus, and removal of common build tools/modules. Adds logging and a warning when no library dirs are found.
2026-02-03 15:58:23 +02:00
oop7 ce4a034224 Refactor Linux build trimming and cleanup
Consolidate and harden post-build cleanup by targeting the build's lib directory (lib_dir) instead of running broad finds across build_dir. Removes screenshots, PySide6 translations, specific Qt plugins and plugin files, and various Qt6 shared libraries (Web, Pdf, Qml, Quick, VirtualKeyboard, OpenGL) to reduce bundle size. Also removes common build tools/modules (setuptools, wheel, pkg_resources, _distutils_hack, curses, _pyrepl) and adds explicit logging and a warning if lib_dir is missing. Simplifies and centralizes cleanup logic for more predictable and efficient trimming of Linux artifacts.
2026-02-03 15:40:48 +02:00
oop7 536594a56e Improve macOS app bundle trimming script
Enhance the .github workflow that trims macOS .app bundles by robustly detecting the library directory (with fallbacks) and performing deeper cleanup. Removes screenshots, Qt translations, many Qt plugin folders, specific image/icon libs, bulk Qt6 libraries, and several Python build/tool modules; adapts for macOS dylib naming. Adds logging and a warning if the lib directory cannot be determined to avoid accidental deletes.
2026-02-03 15:32:38 +02:00
oop7 3ea5fedfa3 Remove Qt DLLs from PySide6 and suppress errors
Add -ErrorAction SilentlyContinue to Get-ChildItem calls and add a check for a lib\PySide6 folder to remove matching Qt DLLs there as well. This prevents failures when no files match the patterns and ensures duplicate Qt DLLs packaged under PySide6 are cleaned up. Applied to both DLL-cleanup sections of the Windows build workflow.
2026-02-03 15:20:09 +02:00
oop7 dab35a1a3a Prune PySide6 files in Windows build workflow
Refactor Windows build cleanup to use a dedicated $libDir and more aggressively prune unused PySide6/Qt files. Replaces direct $distDir references with $libDir for lib content and removes screenshots, PDBs, translations, many plugin folders, specific image/icon plugins (qpdf/qsvg/qsvgicon), platform input contexts, and common bulky Qt DLL patterns. Also removes several build tools/unused Python modules (setuptools, wheel, pkg_resources, _distutils_hack, curses, _pyrepl). Applied the same changes to both YTSage and YTSage-FFmpeg packaging steps to reduce bundle size and noise, and improved log messages for removed items.
2026-02-03 15:04:30 +02:00
oop7 cc3a00e1e0 Enhance Linux build packaging and cleanup
Adjust build-linux CI to produce smaller, self-contained AppImages: enable silent build output, add zip_include_packages so key libs (PySide6, shiboken6, requests, PIL, packaging) are packaged, and add extra excludes (pydoc, doctest, email). Use python -OO for optimized bytecode. Expand post-build trimming to remove screenshots, Qt translations, unused PySide6 plugins and other Qt artifacts (Qt6Web*, Qt6Pdf*) with informative logging. These changes reduce package size and avoid shipping unnecessary runtime components.
2026-02-03 14:46:37 +02:00
oop7 bf9e11d08f macOS build: trim .app bundle and packaging tweaks
Improve macOS CI packaging by trimming unnecessary files from the built .app and adjusting build options. Changes include:

- Enable cx_Freeze silent build and run Python with -OO for bdist_mac.
- Add zip_include_packages to ensure key packages are bundled inside zip distributions.
- Exclude additional stdlib modules (pydoc, doctest, email) to reduce size.
- New workflow step to locate the generated .app and remove screenshots, Qt translations, unused PySide6 plugins and other Qt artifacts (Qt6Web*, Qt6Pdf*), with safer path detection and logging.
- Remove noisy post-build directory listings and simplify DMG handling/log messages; make .app and .dmg discovery more robust.

These changes aim to produce smaller, cleaner artifacts and more reliable CI packaging for macOS builds.
2026-02-03 14:41:19 +02:00
oop7 6c98d729ea Optimize Windows builds and trim dist files
Add build/time optimizations and post-build trimming for Windows CI. Enables silent cxfreeze output and adds zip_include_packages (PySide6, shiboken6, requests, PIL, packaging) so selected packages are included in the zip; excludes additional stdlib modules (pydoc, doctest, email) to reduce bundle size. Switches build invocation to python -OO for extra optimization and adds dedicated PowerShell steps (for both standard and FFmpeg builds) that remove screenshots, PDB debug files, unused Qt translations/plugins and extra Qt DLLs (Qt6Web*/Qt6Pdf*) to shrink artifacts and remove unnecessary files before packaging.
2026-02-03 14:17:46 +02:00
oop7 2935eb01c1 Add smooth tab widget with fade transitions
Introduce SmoothTabWidget and a FadingStackedWidget to provide cross-fade transitions between tabs. Added ytsage/gui/ytsage_smooth_tab_widget.py which implements a QTabBar + FadingStackedWidget (default 300ms fade) and overlay-based fade logic. Updated ytsage/gui/ytsage_gui_dialogs/ytsage_dialogs_custom.py to use SmoothTabWidget instead of QTabWidget and adjusted the stylesheet selector to target the new content frame (#tabContent) so existing styles continue to apply.
2026-02-01 14:30:54 +02:00
oop7 79a85cf707 Run dialogs with blurred screenshot overlay
Add a safe blurred-overlay flow for modal dialogs by implementing run_dialog_with_blur and _apply_blur_to_pixmap on YTSageApp. The new flow captures a window screenshot, generates a blurred/dimmed pixmap via a QGraphicsScene + QGraphicsBlurEffect, shows it in an overlay QLabel with a fade-in, runs the dialog, and then removes the overlay.

Replace many direct dialog.exec() calls with run_dialog_with_blur(...) across the main GUI (download settings, about, history, playlist selection, custom options, cookie login, ffmpeg check, time range, setup success dialogs, etc.). Also add imports required for pixmap/graphics handling.

Make animate_widget_fade_in usage safer by checking for the method before calling it and falling back to setVisible(True) for format table and thumbnails to avoid QPainter/graphics-effect conflicts. Small comment/cleanup in fade-in/out methods.
2026-02-01 14:23:32 +02:00
oop7 7890a94702 Add pressed padding to QPushButton styles
Update ytsage/gui/ytsage_stylesheet.py to add explicit padding for various QPushButton:pressed rules (and QPushButton:checked:pressed) across multiple style blocks. These changes unify the visual spacing and touch feedback when buttons are pressed, ensuring consistent pressed-state layout and appearance.
2026-02-01 12:51:36 +02:00
oop7 36eff02b18 Add widget shake animation for invalid input
Introduce a shake animation to visually indicate invalid inputs and wire it into validation/error flows. Changes: import QPoint; add animate_widget_shake(QWidget) implementation that uses QPropertyAnimation on widget.pos with keyframes; call the animation when URL/path/format validations fail and replace some direct status_label updates with set_status_message_animated. Updated files: ytsage/gui/ytsage_gui_main.py and ytsage/gui/ytsage_gui_analysis.py.
2026-02-01 12:36:00 +02:00
oop7 091c6c68c1 Fade in video thumbnail on load
Hide the thumbnail QLabel before assigning the pixmap and trigger animate_widget_fade_in to smoothly fade the thumbnail into view. Keeps existing exception logging for thumbnail processing.
2026-02-01 12:27:07 +02:00
oop7 f9a9dc4879 Animate widget visibility and fix fades
Use animated show/hide for playlist widgets and harden fade animations. Replace direct setVisible signal handlers with lambdas that call set_widget_visible_animated, and add set_widget_visible_animated to route to fade-in/out. Fade methods now stop opposing animations, reuse existing QGraphicsOpacityEffect when present, preserve current opacity as start values, and set effect opacity when creating a new effect. Also catch possible RuntimeError when stopping animations and keep animation references on widgets to avoid premature GC.
2026-02-01 12:26:57 +02:00
oop7 621d47d701 Hide and fade-in format table on build
Make the format table invisible while it's populated and filtered to avoid visual artifacts, then animate its appearance with animate_widget_fade_in after initial filtering. This ensures a smoother UI when the table is first built.
2026-02-01 12:26:47 +02:00
oop7 2d42be1a0c Add animated fade for status and controls
Introduce smooth UI transitions by adding opacity-based animations. Import QGraphicsOpacityEffect and add animate_widget_fade_in, animate_widget_fade_out, and set_status_message_animated to cross-fade status text and fade buttons in/out. Update signal handlers and download flow to use the new animated status setter and fade methods instead of direct setText/setVisible calls. Keep animation references on widgets to avoid premature GC and remove effects after fade-out.
2026-02-01 12:21:41 +02:00
oop7 ffe64acbeb Capture yt-dlp errors and show better messages
Initialize an error buffer and collect yt-dlp "ERROR:" output lines during direct command runs. When the process exits non‑zero, emit a more informative error using the last two captured error lines (falling back to the generic return-code message if none were captured). Also ensure the buffer is present before appending and keep the existing delay/cleanup flow.
2026-02-01 11:40:00 +02:00
oop7 7bc4488635 Include PySide6.QtNetwork in build workflows
Moved PySide6.QtNetwork from the excludes to the includes list in build workflows for Linux, macOS, and Windows. This ensures the QtNetwork module is bundled during packaging.
2026-01-25 15:53:17 +02:00
oop7 387621cb24 Update icon path in build scripts
Changed the icon installation path from assets/branding/icons/icon.png to branding/icons/icon.png in Linux packaging steps to reflect updated directory structure.
2026-01-25 14:54:00 +02:00
oop7 38f08543d9 Fix build config for Linux workflow
Corrected script path to 'ytsage_entry.py', updated icon path, and fixed configuration for including system libraries and binary excludes in the build-linux.yml workflow.
2026-01-25 14:45:54 +02:00
oop7 2e42d26f44 Bump version to 5.0.0b2
Update the __version__ string in ytsage/__init__.py to 5.0.0b2 to reflect the latest changes.
2026-01-25 14:29:01 +02:00
oop7 c8ff4849fe Add module docstring to utils package
Introduced a descriptive docstring in ytsage/utils/__init__.py to clarify the purpose of the utilities package and its contents.
2026-01-25 14:22:58 +02:00
oop7 c15d615b06 Add MANIFEST.in to include project files in package
Adds a MANIFEST.in file to ensure README.md, LICENSE, pyproject.toml, and all files in ytsage/assets and ytsage/languages are included in the package distribution.
2026-01-25 14:20:01 +02:00
oop7 9a1fb33996 Update macOS artifact naming in CI/CD docs
Clarified the naming convention for macOS build artifacts by specifying 'arm64' in the filenames for the zipped app bundle and disk image installer.
2026-01-25 14:11:11 +02:00
oop7 96dadd7e5b Refactor GUI package structure and update imports
Moved all files from src/gui/ to ytsage/gui/ and updated import statements to use relative imports within the new package structure. This improves modularity and prepares the codebase for distribution as a proper Python package.
2026-01-25 14:07:51 +02:00
oop7 4fb9815ac6 Rename package directory from src to ytsage
Moved __init__.py from src/ to ytsage/ to reflect the new package structure. This change helps clarify the package namespace.
2026-01-25 14:07:29 +02:00