diff options
| author | exislow <exislow@users.noreply.github.com> | 2025-08-12 10:18:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-12 10:18:48 +0200 |
| commit | 23fda8ed33cfbbd03e11e27bd5d6964e54dd2dca (patch) | |
| tree | c34e3cc0cd9a1616e6456973ac04c251e6bf69f7 | |
| parent | c825cc2587a20994c53b9c61cd3ee769759eae25 (diff) | |
| parent | a0a6a8d15b32bf4f95dda7c35934f8aaad8478a5 (diff) | |
| download | tidal-dl-ng-23fda8ed33cfbbd03e11e27bd5d6964e54dd2dca.tar.gz | |
Merge pull request #497 from exislow/add-video-id
refactor(helper): improve ID format handling logic
| -rw-r--r-- | poetry.lock | 2 | ||||
| -rw-r--r-- | tidal_dl_ng/helper/path.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/poetry.lock b/poetry.lock index 19a650a..d8927a1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2358,4 +2358,4 @@ gui = ["pyqtdarktheme-fork", "pyside6"] [metadata] lock-version = "2.1" python-versions = ">=3.12,<3.13" -content-hash = "e2545be9d3073f35d9f926d7c45b97e2e53f66447132e0f4eeb2330cb2291246" +content-hash = "e27796fbb2cf94075e1304607b89c746b9e2f4a4cda8edb216a9025a8d6fc4fa" diff --git a/tidal_dl_ng/helper/path.py b/tidal_dl_ng/helper/path.py index 12ffdce..0f7de31 100644 --- a/tidal_dl_ng/helper/path.py +++ b/tidal_dl_ng/helper/path.py @@ -279,8 +279,10 @@ def _format_ids( str | None: The formatted ID or None if the format string is not ID-related. """ # Handle track and playlist IDs - if (name == "track_id" and isinstance(media, Track | Video)) or ( - name == "playlist_id" and isinstance(media, Playlist) + if ( + (name == "track_id" and isinstance(media, Track)) + or (name == "playlist_id" and isinstance(media, Playlist)) + or (name == "video_id" and isinstance(media, Video)) ): return str(media.id) # Handle album IDs |
