Commit Graph
169 Commits
Author SHA1 Message Date
Rikrdoga 4f0026fada Create TrackStreamInfo dataclass & Add proper docstrings 2025-11-12 15:18:35 -06:00
Rikrdoga af58b0a83d Resolve Race Condition and Optimize Session Switching for Atmos Downloads 2025-11-04 12:36:27 -06:00
exislowandGitHub b485292807 Merge pull request #596 from Winman486/fix/rate-limiting-playlist-downloads
Fix/rate limiting playlist downloads
2025-10-22 21:38:30 +02:00
Rikrdoga e266149684 Move credentials to constants, improve docs (tidal_obj), and clean up Atmos legacy code 2025-10-21 11:58:34 -06:00
Rikrdoga 234ed80192 minor fix: Respect audio quality selected 2025-10-20 21:34:50 -06:00
Rikrdoga 70cfc1b6eb Apply formatter and fix TRY003 2025-10-20 20:46:36 -06:00
Rikrdoga cb32c2fa8b Refactor Dolby Atmos Implementation 2025-10-20 20:23:14 -06:00
Winman486 3c835c2d19 Merge upstream/master and resolve conflicts
- Resolved conflict in dialog_settings.py (kept both cb_use_primary_album_artist and cb_mark_explicit checkboxes)
- Fixed code quality issues found by make check:
  * Removed duplicate on_download_album_from_track function (F811)
  * Updated isinstance calls to use X | Y syntax instead of (X, Y) (UP038)
  * Fixed unused loop variable album_stub (B007)
  * Applied automatic formatting fixes (black, prettier, trailing whitespace)
- Only remaining issue is C901 complexity warning in on_download_all_albums_from_playlist (expected per maintainer feedback)
2025-10-20 16:12:46 -05:00
Rikrdoga 2c2cc0283a Refactor Dolby Atmos feature to be internal and seamless 2025-10-20 10:47:43 -06:00
exislowandGitHub 307ea1bd6d Merge pull request #600 from truubo/597-optional-explicit-symbol-in-track-title
feat(metadata): Toggle explicit symbol in track titles
2025-10-20 08:17:52 +02:00
Robert Honz ffbd7849a1 fix(download): 🐛 handle missing st_birthtime attribute in track sorting
* Updated the sorting method for track paths to check for the presence of `st_birthtime`.
* If `st_birthtime` is not available, fallback to using `st_ctime` for sorting.
2025-10-20 08:12:34 +02:00
Robert Honz 2b932e84b4 fix(download): 🐛 update sorting method for track paths
* Changed sorting method from `os.path.getctime` to `x.stat().st_birthtime` for better accuracy in track creation time.
* This improves the reliability of track order when not dealing with albums.
2025-10-20 08:06:25 +02:00
Trubo 2402550884 Add a checkbox to settings that toggles the explicit symbol in track titles 2025-10-19 18:16:19 -05:00
Winman486 ac3bf51c56 feat(gui): add 'Download Full Album', 'Download All Albums', and 'Single album folder (primary artist)' preference 2025-10-17 15:17:02 -05:00
Robert Honz c8cb43adf7 feat(metadata): ✨ add explicit track metadata handling
* Introduced `METADATA_EXPLICIT` constant for explicit track indication.
* Updated `Download` class to append explicit metadata to track titles.
2025-10-17 15:40:28 +02:00
Robert Honz 07494eddf3 feat(metadata): ✨ add support for explicit track metadata
* Added `explicit` attribute to the `Metadata` class.
* Updated the constructor to initialize `explicit` with a default value of `False`.
* Modified the metadata saving process to include explicit rating in tags.
2025-10-17 15:26:48 +02:00
Robert Honz 676569e511 feat(metadata): ✨ add support for synced and unsynced lyrics
* Introduced `lyrics_synced` and `lyrics_unsynced` fields in the `Metadata` class.
* Updated the `Download` class to handle both synced and unsynced lyrics from the track.
* Enhanced metadata writing to include `UNSYNCEDLYRICS` in the tags.
2025-10-17 14:41:23 +02:00
Robert Honz a2e637e89c feat(metadata): ✨ add UPC metadata handling and configuration
* Introduced `MetadataTargetUPC` enum for target metadata tags.
* Added `METADATA_LOOKUP_UPC` dictionary for mapping file formats to UPC tags.
* Updated `Metadata` class to include `target_upc` for dynamic UPC tag assignment.
* Enhanced `Settings` class to allow configuration of `metadata_target_upc`.
2025-10-17 13:46:47 +02:00
Robert Honz dd5a402dce feat(path): ✨ add customizable delimiters for artist names in file paths
* Updated `format_path_media` and related functions to accept customizable delimiters for artist names.
* Modified `Settings` class to include `filename_delimiter_artist` and `filename_delimiter_album_artist`.
* Enhanced `name_builder_artist` and `name_builder_album_artist` functions to utilize the new delimiters.
2025-10-17 13:13:19 +02:00
Robert Honz 5da1855028 feat(metadata): ✨ add customizable metadata delimiters for artists
* Introduced `metadata_delimiter_artist` and `metadata_delimiter_album_artist` settings.
* Updated `name_builder_artist` and `name_builder_album_artist` functions to utilize the new delimiters.
* This allows users to specify their preferred delimiter for artist names in metadata.
2025-10-17 12:06:25 +02:00
Robert Honz 768ca6db9c fix(download): 🐛 handle empty items list in download process
* Added a check for empty `items` list to mark progress as complete.
* Ensured GUI updates correctly reflect progress for empty downloads.
2025-10-06 13:36:29 +02:00
Robert Honz 8f8e8e0a78 fix(download): 🐛 adjust cover image handling to prevent metadata size issues
* Prevent writing `CoverDimensions.PxORIGIN` to metadata to avoid exceeding max file size (>16Mb).
* Ensure correct cover image is used based on `cover_dimension` settings.
2025-09-07 19:37:39 +02:00
Robert Honz 8dd75897e3 refactor(constants): streamline enums and enhance type annotations
This commit refactors the codebase to improve readability and maintainability by updating enums and type annotations:

- ✨ **Replaced `StrEnum` attributes**: Removed explicit type declarations for enum values to simplify the code.
- 🛠️ **Introduced `AudioExtensionsValid` enum**: Added a new enum for valid audio file extensions.
- 🔄 **Enhanced type annotations**: Updated `FAVORITES` dictionary to include specific type hints for clarity.
- 🧹 **Updated references**: Replaced outdated `AudioExtensions` usage with the new `AudioExtensionsValid`.

These changes improve code clarity, enforce stricter typing, and enhance extensibility.
2025-08-13 08:17:11 +02:00
Robert Honz f16165558c feat: add metadata_write_url setting for conditional URL metadata writing
Introduces a new configuration option, `metadata_write_url`, to control whether the media file URL is included in metadata. Updates logic to respect this setting.

- ✨ **Feature**: Adds `metadata_write_url` to enable/disable URL writing in metadata.
- 🔧 **Logic Update**: Adjusts URL handling to check the new setting before including it.
- 📝 **Documentation**: Updates help descriptions to explain the new option.

This change improves flexibility in metadata customization.
2025-08-12 19:36:41 +02:00
Robert Honz d481a26ccb feat: add support for original image dimension in album covers
Adds functionality to handle original image dimensions (`origin`) for album cover downloads.

- ✨ Added `PxORIGIN` option to cover dimension constants.
- 🔄 Updated cover image URL logic to support original dimensions.
- 🛠️ Improved cover data handling for more flexible metadata embedding.

This enhances customization and fidelity in cover image management.
2025-08-12 18:22:59 +02:00
Robert Honz bf2f5055a0 feat(metadata): add UPC support for metadata tagging
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.
2025-08-12 09:55:34 +02:00
Robert Honz a96d44170b refactor(download): 🔧 Improve media validation and preparation logic
* 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.
2025-07-03 08:53:44 +02:00
Robert Honz 3085cd67a1 refactor(download): ✨ Enhance media collection handling and download execution
* 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.
2025-07-02 15:11:19 +02:00
Robert Honz 33f5fcbda8 refactor(download): 🔧 Improve media validation and download process
* 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.
2025-07-02 14:52:31 +02:00
Robert Honz 37f9250cdf refactor(download): ✨ Refactor media download logic for clarity and efficiency
* 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.
2025-07-02 10:29:54 +02:00
Robert Honz 35d4ff9229 refactor(download): ✨ Enhance docstrings for RequestsClient and Download classes
* Improved documentation for methods in the `RequestsClient` and `Download` classes.
* Added detailed descriptions, parameters, and return types to enhance code readability and maintainability.
2025-07-02 08:55:56 +02:00
Robert Honz fd16a620f2 refactor(gui): ✨ Enhance type annotations and improve method signatures
* 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.
2025-07-02 08:47:59 +02:00
Robert Honz 70e29771b9 🛠️ Directory length limit is checked and adapted correctly now. Fixes #447 & #436 2025-06-30 16:33:32 +02:00
Robert Honz 039546ffe8 👷 Lists and cover will be loaded in background. Gui won't hang anymore. Fixes #423 2025-06-29 20:33:22 +02:00
Robert Honz 819655d8b7 ✨ Implemented playlist track position naming ({list_pos}) for downloads. Fixes #165 2025-04-02 07:00:28 +02:00
Robert Honz 6ac116beed 🛠️ Fixed and simplified path_file_sanitize method. 2025-03-27 19:01:51 +01:00
Robert Honz 309ded73e4 🛠️ Fix: Only re-create media item if it is a track. Fixes #386 2025-03-25 21:22:35 +01:00
Robert Honz b50e3bd14d 👷 Code style. 2025-03-24 09:01:49 +01:00
Robert Honz efc2549ab5 👷 Check if albums and videos are available or not due to regional restrictions. Fixes #277 2025-03-24 08:57:47 +01:00
Robert Honz 0684994850 ✨ Downloads can be now paused / resumed. Fixes #149 & 324
👷 Shutdown is handled more gracefully.
2025-03-03 09:31:37 +01:00
Robert Honz 0726175503 👷 CLI: Download list is scrolling vertically and overall progress is shown at the bottom. Fixes #374 2025-03-01 21:53:46 +01:00
Robert Honz 303435ad1e 👷 Close network connections explicitly. Fixes #371 2025-02-28 17:27:12 +01:00
Robert Honz 7a4d6ceae7 🛠️ Fixed path length sanitation. Also refactored the path helper to use pathlib.Path instead of str. Fixed #358 2025-02-28 16:57:18 +01:00
Robert Honz 39e0e876d7 🛠️ Fixed composer in metadata. Needs to be empty string. 2025-02-28 11:47:38 +01:00
Robert Honz 5e91194bd1 ✨ Replay gain information can be disabled in settings. Fixes #176
🛠️ Fixed some warnings
2025-02-28 10:55:41 +01:00
Robert Honz 57789f10e8 ✨ Adding TIDAL share url to metadata. See #176 2025-02-28 10:39:53 +01:00
Robert Honz 113448620e 🛠️ Fix: No media_metadata_tags available for videos. Fixes #338 2025-01-17 09:43:41 +01:00
Robert Honz 2055606d0b 👷 File extension guesser improved. Fixes #322 2025-01-12 17:42:09 +01:00
Robert Honz bf7000cab0 🛠️ Fix: Playlist was not created if symlink was deactivated. Fixes #322 2025-01-11 16:07:30 +01:00
Robert Honz 8e66cb3259 🛠️ Fix: Very short tracks detected as corrupt download. 2025-01-05 21:26:11 +01:00