Commit Graph

452 Commits

Author SHA1 Message Date
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
oop7 fa3dc0236f Refactor core module imports and update paths
Renamed 'src/core' to 'ytsage/core' and updated all internal imports to use relative paths. This improves package structure and ensures correct module resolution after the directory move.
2026-01-25 14:07:03 +02:00
oop7 ca6b53715e Refactor utils module structure and update imports
Moved utility modules from src/utils/ to ytsage/utils/ and updated all relative imports accordingly. Adjusted docstring usage examples and fixed a path reference in LocalizationManager to reflect the new directory structure.
2026-01-25 14:06:41 +02:00
oop7 ad5f304d4e Move main.py to ytsage/ and update imports
Renamed main.py to ytsage/main.py and updated relative imports to reflect the new module structure.
2026-01-25 14:05:55 +02:00
oop7 7efcfaa85b Update Windows build workflow for pyproject and asset paths
Switch pip cache and install to use pyproject.toml instead of requirements.txt. Update cx_Freeze setup to use a new entry point, adjust included packages and asset paths to reflect new project structure, and update icon path.
2026-01-25 14:05:44 +02:00
oop7 de7d7965f2 Update macOS build workflow for pyproject and new structure
Switches dependency installation from requirements.txt to pyproject.toml and updates pip cache key accordingly. Refactors cx_Freeze setup to use a new entry point, adjusts included files and paths to match the updated project structure, and updates icon file references.
2026-01-25 14:05:38 +02:00
oop7 a0df6b273f Update Linux build workflow for PEP 517 and cx_Freeze
Switch pip install to use PEP 517 (pyproject.toml) instead of requirements.txt and update cache key accordingly. Refactor cx_Freeze setup to use new asset paths, add entry point script, and adjust include_files for correct packaging structure.
2026-01-25 14:05:34 +02:00
oop7 2e5e40cbf5 Update README for new directory structure and usage
Updated image paths and installation instructions to reflect the new project structure. The documentation now references the 'branding' directory instead of 'assets/branding', and installation uses 'pip install .' with module execution via 'python -m ytsage.main'. The project tree was revised to match the reorganized source and asset directories.
2026-01-25 14:05:05 +02:00
oop7 32b2b544f4 Add build_release.py for automated release process
Introduces a script to automate the production build process, including backing up and modifying the README for PyPI, cleaning previous build artifacts, building the wheel, and restoring the original README. This streamlines and standardizes the release workflow.
2026-01-25 14:04:39 +02:00
oop7 2aac706ef7 Migrate dependencies to pyproject.toml
Replaced requirements.txt with pyproject.toml to modernize project configuration and dependency management using PEP 621 standards. This change improves compatibility with modern Python packaging tools.
2026-01-25 14:04:31 +02:00
oop7 f9eace71e0 Reorganize asset and branding file structure
Moved icons, screenshots, SVGs, and sound files to new locations under 'branding' and 'ytsage/assets' directories for improved project organization.
2026-01-25 14:04:08 +02:00
oop7 acda70150f Move language files to ytsage/languages directory
Renamed and relocated all language JSON files from the root 'languages' directory to 'ytsage/languages' for improved project organization.
2026-01-25 14:03:01 +02:00
oop7 99d3b6ae17 Update CI/CD README with Flatpak and macOS details
Added Flatpak bundle to the list of Linux artifacts and clarified that the macOS zipped application bundle is for arm64 architecture.
2026-01-25 14:02:08 +02:00
oop7 065c5c9c36 Add FFmpeg and yt-dlp setup translations
Extended it.json, ja.json, pl.json, pt.json, ru.json, and tr.json with new translation keys for FFmpeg installation and yt-dlp setup dialogs, error messages, and status updates. Also added new UI strings for cookies, proxy, download, and history features to improve localization coverage.
2026-01-24 19:51:00 +02:00