Commit Graph

103 Commits

Author SHA1 Message Date
oop7 b9b0285e95 Refactor config handling to use ConfigManager
Replaced direct usage of load_config and save_config with ConfigManager in ytsage_utils.py and ytsage_dialogs_update.py. Removed legacy config functions from ytsage_utils.py to centralize configuration management and improve maintainability.
2026-01-24 16:54:08 +02:00
oop7 02ede913d2 Refactor analysis to use QThread for thread safety
Replaces the use of Python's threading with a dedicated QThread-based AnalysisThread for URL analysis, ensuring all UI updates are performed via Qt signals for thread safety. Adds cancellation support for analysis, improves error handling, and updates the main window's close event to properly terminate the analysis thread if running. This refactor enhances stability and responsiveness of the GUI during analysis operations.
2026-01-24 16:50:24 +02:00
oop7 64560fabb2 Replace pyglet with QtMultimedia for audio playback
Removed pyglet dependency and migrated notification sound playback to use PySide6.QtMultimedia's QMediaPlayer and QAudioOutput. Updated workflow and requirements files to remove pyglet and ensure PySide6.QtMultimedia is included in build steps.
2026-01-24 16:25:52 +02:00
oop7 d5d7a0186d Refactor analysis logic into AnalysisMixin
Moved all analysis-related methods from YTSageApp in ytsage_gui_main.py to a new AnalysisMixin in ytsage_gui_analysis.py. This improves code organization and separation of concerns by isolating analysis logic from the main application class.
2026-01-24 14:00:13 +02:00
oop7 370836b814 Refactor GUI styles to use centralized StyleSheet class
Moved all inline widget style definitions in ytsage_gui_main.py to named constants in the StyleSheet class in ytsage_stylesheet.py. This centralizes and simplifies style management, improves maintainability, and ensures consistent theming across the application.
2026-01-24 13:46:16 +02:00
oop7 9759fa565f Refactor UI startup and stylesheet handling
Moved the main application stylesheet to a new src/gui/ytsage_stylesheet.py module and applied it via StyleSheet.MAIN. Deferred blocking startup checks (FFmpeg, yt-dlp, Deno, updates) until after the UI is shown to improve responsiveness. Improved subtitle file deletion logic and added destination filename capture in downloader. Added custom style for auto-update checkbox in updater dialog.
2026-01-24 13:35:02 +02:00
oop7 4d4d9e10b9 Refactor updater checks to use QThread for async operations
Replaces manual threading for FFmpeg and Deno version checks with dedicated QThread subclasses (FFmpegCheckThread and DenoCheckThread). This improves integration with the Qt event loop, enables use of signals and slots for UI updates, and enhances error handling.
2026-01-24 12:57:37 +02:00
oop7 a871ded15f Move update check to background thread
Refactored the update checking logic into a QThread subclass to prevent blocking the UI during network requests. The update check now runs asynchronously, and the dialog is shown via a signal when an update is available.
2026-01-24 12:52:48 +02:00
oop7 e2c4dfea4e Increase menu button area in history delegate
Expanded the clickable area for the menu button in HistoryDelegate to 60x50px and adjusted text width accordingly. This improves usability and addresses issues with the left side of the button not responding to clicks.
2026-01-21 18:10:34 +02:00
oop7 5f17fabc50 Refactor history dialog to use virtualized list and SQLite
Replaces the history dialog's widget-per-entry approach with a virtualized QListView using a custom model and delegate for improved performance. Switches the HistoryManager backend from JSON file storage to SQLite, including automatic migration of legacy data. Adds support for efficient search, thumbnail caching, and context menu actions in the new UI.
2026-01-21 17:56:56 +02:00
oop7 29f713cf17 Refine HistoryEntryWidget layout and sizing
Adjusted padding, margin, and spacing for a more compact layout. Standardized the thumbnail size to 240x135 (16:9 ratio) and reduced the menu button size for better visual balance.
2026-01-21 17:19:49 +02:00
oop7 ea54f469ac Improve history loading and thumbnail caching UX
Refactors the history loading process to emit entries as soon as they are loaded, allowing the UI to display immediately. Thumbnail downloads are now handled in the background, with widgets updated via a new signal when thumbnails are cached. This prevents UI freezes and improves responsiveness by showing placeholders until thumbnails are available.
2026-01-21 17:16:48 +02:00
oop7 a92ffd3b01 Download video thumbnails asynchronously in GUI
Refactored thumbnail downloading to use a QThread for asynchronous operation, preventing UI blocking. Added ThumbnailDownloadThread class and updated VideoInfoMixin to handle threaded download and error reporting.
2026-01-21 17:16:35 +02:00
oop7 0d1eb35ba2 Add debug log for yt-dlp command execution
Inserted a debug log statement to output the full yt-dlp command before execution. This will help diagnose issues related to command construction and subprocess invocation.
2026-01-21 15:15:14 +02:00
oop7 67fdb508f4 Optimize playlist extraction with yt-dlp flat-playlist
Switches to using yt-dlp's --flat-playlist and --dump-single-json for faster initial playlist info extraction. Now fetches minimal info for all videos quickly, then retrieves full details for the first video only to populate format information, improving performance and reducing unnecessary data processing.
2026-01-17 21:43:08 +02:00
oop7 ffb938b181 Add playlist filter and show video durations in selection dialog
Introduces a filter input to the PlaylistSelectionDialog for searching videos by title and displays video durations next to each entry. Updates English translations to support the new filter placeholder and analysis status message.
2026-01-17 21:43:01 +02:00
oop7 2b7cce1333 Add threaded loading and spinner to history dialog
Introduces a HistoryLoaderThread to load history entries and pre-fetch thumbnails in the background, preventing UI freezes. Adds a loading spinner and disables the 'Clear All' button while loading, improving user experience during history retrieval.
2026-01-17 21:26:26 +02:00
oop7 f8f2910f06 Fix f-string backslash SyntaxError in AboutDialog
Refactored AboutDialog to avoid backslashes in f-string expressions by assigning HTML links to variables before formatting. This resolves a SyntaxError encountered when running YTSage with Python 3.11.
2026-01-17 21:10:01 +02:00
oop7 c16e84105e Increase subprocess timeout to 300 seconds
Extended the timeout for the subprocess running yt-dlp from 60 to 300 seconds to accommodate longer-running download or processing tasks.
2026-01-17 21:01:52 +02:00
oop7 d45a4a35a4 Add update-in-progress handling and translations
Introduces 'update in progress' messages to all supported languages and updates the GUI to prevent analysis or downloads while yt-dlp is updating. Adds flags to track update and analysis states, ensuring user actions are blocked with appropriate warnings during updates.
2025-12-09 20:53:20 +02:00
oop7 b70dfb58e7 Adjust QLineEdit padding in main GUI
Reduced the vertical padding of QLineEdit elements from 12px to 5px to improve the appearance and spacing in the main application window.
2025-12-09 20:36:07 +02:00
oop7 bfd30513f6 Refine input and button styles in main and video info UI
Improved the appearance and spacing of the URL input, paste, and analyze buttons in the main GUI, including updated padding, border, and color styles. Adjusted font sizes and colors for video info labels for a more consistent and polished look.
2025-12-06 21:40:59 +02:00
oop7 835ae45121 Disable editing in format table
Set the format table's edit triggers to NoEditTriggers to prevent cell editing and avoid selection box on double-click.
2025-12-06 21:40:49 +02:00
oop7 62298dabf3 Enable analyze button only when URL is entered
Added logic to disable the analyze button until a non-empty URL is entered. Updated button styling for the disabled state and ensured consistent enabling/disabling of the analyze button based on input and control state.
2025-11-29 13:47:10 +02:00
oop7 15451f7715 Switch update checks from GitHub API to PyPI
Update logic in updater dialog and main app to fetch latest version info from PyPI instead of GitHub API, avoiding rate limiting issues. Changelog is now fetched from GitHub only as a fallback, improving reliability of update checks.
2025-11-29 13:31:57 +02:00
oop7 b58b1a6857 Persist cookie settings using ConfigManager
Refactored cookie settings initialization and application to use ConfigManager for persistence. Cookie source, browser, profile, file path, and active status are now saved and loaded from config, ensuring consistent behavior across sessions. Cookies remain inactive on app launch until explicitly applied by the user.
2025-11-28 18:18:57 +02:00
oop7 fc719a8cc8 Add thumbnail status messages and refactor thumbnail saving
Added new localized status messages for thumbnail saving in all supported languages. Refactored the thumbnail saving logic in ytsage_gui_video_info.py to use cached images from analysis instead of extracting via yt-dlp subprocess, improving reliability and performance.
2025-11-28 18:00:56 +02:00
oop7 3f0db8208b Add audio format settings update in preferences
Audio format settings (force and preferred) are now updated from the preferences dialog. Tooltip update logic is extended to reflect changes in audio format settings.
2025-11-17 15:26:37 +02:00
oop7 f2b6dc26cb Add audio format selection for audio-only downloads
Introduces settings and UI for forcing audio format conversion on audio-only downloads, including support for selecting preferred audio formats. Updates language files for all supported languages, adds config options, and passes new settings through the downloader and main app logic.
2025-11-17 15:23:48 +02:00
oop7 15bf5673e3 Refactor table column sizing for mixed stretch modes
Updated the format table column configuration to use a 'stretch' flag for each column, allowing some columns to stretch while others remain fixed. This improves layout flexibility and ensures important columns have consistent sizing.
2025-11-15 18:27:05 +02:00
oop7 9d5a2460b1 Add Deno version check and update UI
Introduces a Deno version checker and updater section to the updater tab, with localized strings in all supported languages. Adds backend functions for fetching the latest Deno version, comparing versions, and upgrading Deno, along with corresponding GUI logic for checking and updating Deno from the interface.
2025-11-14 18:44:40 +02:00
oop7 894f999017 Add Deno version detection and caching support
Introduces functions to detect Deno version directly and with caching in ytsage_deno.py and ytsage_utils.py. Updates the About dialog to display Deno status, version, and path if available. Also extends version cache refresh logic to include Deno.
2025-11-14 18:19:02 +02:00
oop7 38a8d9d29f Add Deno setup and integration to application
Introduces Deno binary management, setup dialog, and download/verification logic. Updates localization files for Deno setup messages in all supported languages. Integrates Deno setup checks into main.py and GUI initialization, and adds Deno constants for platform-specific downloads.
2025-11-14 17:58:45 +02:00
oop7 bb231ccd12 Refactor FFmpeg updater to version checker
Replaces the FFmpeg updater logic with a version checker across all supported languages and removes the updater module. The Windows installation logic in ytsage_ffmpeg.py is rewritten to use essentials build extraction and path configuration directly, removing dependency on the updater module. Dialogs and UI strings are updated to reflect the new version checking workflow and provide installation guide links.
2025-11-14 17:10:36 +02:00
oop7 4c07423b49 Add yt-dlp release channel selection to updater UI
Introduces UI elements and logic for selecting between stable and nightly yt-dlp release channels in the updater tab, with support for switching channels and displaying status. Updates all language files with new strings for channel selection and status messages, and adds a default 'ytdlp_channel' config key.
2025-11-12 22:09:58 +02:00
oop7 0764e3327c Reorder language and updater tabs in options dialog
Moved the language tab to appear after the updater tab in the CustomOptionsDialog tab widget for improved tab organization.
2025-11-12 16:36:06 +02:00
oop7 2e302f1d0e Move yt-dlp auto-update settings to updater tab
Refactored auto-update settings for yt-dlp from DownloadSettingsDialog to the UpdaterTabWidget in the Custom Options dialog. Updated logic to use ConfigManager for settings management and ensured settings are saved when the dialog is accepted. This improves separation of concerns and centralizes update-related options.
2025-11-12 16:33:25 +02:00
oop7 a3a4352f9d Add FFmpeg updater module and GUI integration
Introduces a new FFmpeg updater module for checking and updating FFmpeg to the latest essentials build, with progress reporting and version comparison. Updates language files with new translation keys for the updater in multiple languages. Refactors Windows FFmpeg installation to use the new updater logic. Adds UpdaterTabWidget to the GUI dialogs for integration of the updater into the application's interface.
2025-11-12 16:04:55 +02:00
oop7 17a33b0c9c Remove unused code and style module
Deleted the ytsage_style.py file and removed related imports, as well as unused compatibility exception classes and the sanitize_filename function. The downloader now always uses the direct CLI command, removing the Python API fallback.
2025-11-04 21:49:33 +02:00
oop7 f2a6f3c3e6 Add analysis-dependent control logic and tooltips
Introduces logic to enable or disable UI controls based on whether video analysis is complete, with appropriate tooltips for disabled states. Updates all language files to include new tooltip strings. Ensures controls like subtitle selection, SponsorBlock, and merge subtitles are only enabled after analysis, improving user guidance and preventing invalid actions.
2025-11-03 21:33:25 +02:00
oop7 3729d2941e Add output format selection to settings
Introduces new settings for forcing output format when merging videos, allowing users to select a preferred format (mp4, webm, mkv). Updates all language files with relevant translations, adds UI controls in the settings dialog, persists settings via ConfigManager, and passes options through the download workflow to yt-dlp.
2025-11-03 20:53:53 +02:00
oop7 70a913b903 Remove update button enable/disable logic
Eliminated the line that enabled or disabled the update_ytdlp_btn in the YTSageApp class. This may be due to a change in UI requirements or the removal of the update button functionality.
2025-11-03 19:32:46 +02:00
oop7 c765e69453 Increase thumbnail size in history entry widget
Adjusted the thumbnail QLabel size from 240x135 to 280x158 in HistoryEntryWidget to better utilize available space and improve visibility.
2025-11-03 19:05:37 +02:00
oop7 d009202230 Refactor yt-dlp update flow and update translations
Replaces manual update check logic in DownloadSettingsDialog with a dedicated YTDLPUpdateDialog for progress tracking. Removes the 'Update yt-dlp' button and related logic from the main window. Updates translation strings in all supported languages to reflect the new update dialog flow and button labeling.
2025-11-03 18:40:28 +02:00
oop7 df4a7ab49d Add download history feature with UI and localization
Introduces a download history dialog with thumbnail previews, redownload, and remove options. Updates all language files to support history-related UI strings. Adds HistoryManager utility and integrates history dialog into the main GUI. Enhances downloader to better track final downloaded files and merged outputs.
2025-11-03 18:27:22 +02:00
oop7 e862c811c2 Use APP_VERSION constant for version display
Replaces hardcoded version strings with the APP_VERSION constant in both the main window and About dialog. This ensures version consistency across the application and simplifies future version updates.
2025-11-01 12:43:58 +02:00
oop7 73479a46bd Improve format selection for audio/video downloads
Refactored format selection logic to explicitly handle audio-only and progressive formats using new flags. Updated GUI to pass format metadata, ensuring correct yt-dlp command construction and more reliable downloads for different format types.
2025-11-01 12:28:32 +02:00
oop7 eeb601cbbd Bump version to 4.9.2
Update version references from 4.9.1 to 4.9.2 in documentation, __init__.py, About dialog, and main application class to prepare for new release.
2025-10-31 19:02:36 +02:00
oop7 32c2d899ba Show error dialog for invalid URLs in GUI
Replaces status label updates with QMessageBox warnings for invalid video URLs in the main UI. Adds 'error_title' translation key to all supported languages for consistent error dialog titles.
2025-10-31 17:54:02 +02:00
oop7 f31b07e018 Revamp cookies tab UI and add apply functionality
Improves the cookies tab in CustomOptionsDialog by making browser extraction the recommended default, updating the status indicator to show active cookies, and adding an Apply button to confirm cookie settings. Refactors radio button logic, status updates, and integrates user feedback via QMessageBox.
2025-10-31 17:46:18 +02:00