Refactors the ID formatting logic to extend support for `video_id` and improve clarity.
- ✨ **Feature:** Adds support for `video_id` in ID formatting logic.
- ♻️ **Refactor:** Updates conditional checks for better readability.
- 🔧 **Metadata:** Updates `poetry.lock` content hash.
These changes enhance functionality and maintainability by accommodating additional media types.
This update introduces support for handling UPCs (Universal Product Codes) in metadata processing. It ensures that UPC information is extracted, stored, and written to the appropriate metadata tags for various formats.
- ✨ **Feature**: Adds UPC field to metadata handling.
- 🛠️ **Enhancement**: Updates metadata initialization to include UPC.
- 🗂️ **Tagging**: Implements UPC writing for supported file formats.
- ✅ **Compatibility**: Ensures proper handling when UPC is absent.
This improvement enhances metadata completeness and compatibility with systems requiring UPC data.
Refactors the CLI structure to improve readability and maintainability:
- ♻️ Replaces `dl_fav_group` with `app_dl_fav` for better naming consistency.
- 🛠️ Restructures the `callback_app` function, removing redundancy.
- 🚀 Adds a URL detection mechanism to streamline `dl <URL>` command simulation.
- ✨ Enhances imports by adding `urlparse`.
These updates aim to simplify the codebase and improve user experience.
* Refactored `_handle_track_or_video` and `_handle_album_playlist_mix_artist` to use `typer.Context` instead of `Settings` directly.
* Improved clarity by centralizing settings retrieval through context.
* Adjusted `_process_url` and `_download` functions to align with the new context-based approach.
* Enhanced `_validate_and_prepare_media` method to support additional media types: `Album`, `Playlist`, `UserPlaylist`, and `Mix`.
* Updated media validation checks to ensure proper handling of unavailable media.
* Refactored `_validate_media_instance` to streamline media instance creation and validation.
* Removed redundant `_validate_and_prepare_media_collection` method for cleaner code.
* Improved validation and preparation of media collections for downloads.
* Refactored download context setup and execution logic for better clarity and maintainability.
* Added progress tracking for download tasks and improved handling of download futures.
* Reordered parameters in `item` method for clarity.
* Added `_validate_media_instance` method to streamline media validation.
* Enhanced `_prepare_file_paths_and_skip_logic` for better file handling.
* Introduced `_perform_actual_download` to encapsulate download logic.
* Improved error handling and logging throughout the download process.
* Renamed `_download` to `_get_media_urls` for better clarity on its purpose.
* Simplified URL extraction logic for `Track` and `Video` media types.
* Improved progress setup and error handling in the download process.
* Enhanced `_download_segments` and `_download_postprocess` methods for better readability and maintainability.
* Improved documentation for methods in the `RequestsClient` and `Download` classes.
* Added detailed descriptions, parameters, and return types to enhance code readability and maintainability.
* Updated type hints for various methods in and classes.
* Changed list types from to for better clarity and consistency.
* Improved function signatures to include return types for better type safety.
* Refactored the filter extraction logic to directly use `header.filter_text(i)` for better clarity.
* Updated the filters list to store tuples of index and text, enhancing the data structure used.
* Ensured that the `proxy_model.filters` is set directly, simplifying the code.
* Updated type hints for several methods in `MainWindow` class to improve code clarity and type safety.
* Changed return types to `None` where applicable.
* Refined parameter types for better type checking and consistency.
* Added detailed docstrings for methods in the `MainWindow` class.
* Improved clarity on parameters and return types for better understanding.
* Aims to facilitate future development and maintenance.
* Refactored `search_result_to_model` to use type hints with `list` instead of `[*SearchTypes]`.
* Added detailed docstring for better understanding of parameters and return types.
* Extracted logic into helper methods for better readability and maintainability.
* Improved handling of item availability and explicit content representation.
* Changed `item_id` type from `int` to `str` for better consistency.
* Updated related list type from `list[int]` to `list[str]`.
* Added type checks for `media_type`, `item_id`, and `file_template` in `_process_url` for improved error handling.
* Enhanced docstrings for clarity and consistency across functions.
* Removed unused imports to clean up the codebase.
* Improved the structure of the `_download` function for better readability.
* Added detailed docstrings for `format_str_media` and related helper functions.
* Refactored media formatting logic to utilize dedicated functions for better readability and maintainability.
* Improved error handling in media formatting.
* Updated `file_unique_suffix` function to correct the spelling of `separator`.
- Added a safeguard to skip items in `user_lists` that do not match expected types (`UserPlaylist`, `Playlist`, or `Mix`).
- Ensured `twi_child` is only accessed when properly initialized.
- This prevents crashes during GUI interaction when unexpected data is encountered.