Skip to content

Commit

Permalink
🐛 fix #66
Browse files Browse the repository at this point in the history
  • Loading branch information
oskvr37 committed Jan 14, 2025
1 parent aaaca1b commit 6d1e9c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tiddl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ def downloadTrack(
if track.get("status") == 404:
raise ValueError(track)

if not track["allowStreaming"]:
logger.warning(
f"The track is not streamable: {track["title"]} ({track["id"]})"
)

file_dir, file_name = formatFilename(file_template, track, playlist)

file_path = f"{download_path}/{file_dir}/{file_name}"
Expand Down Expand Up @@ -191,7 +196,7 @@ def downloadTrack(
with open(file_path, "wb+") as f:
f.write(track_data)

if not cover_data:
if not cover_data and track["album"]["cover"]:
cover = Cover(track["album"]["cover"])
cover_data = cover.content

Expand Down

0 comments on commit 6d1e9c9

Please sign in to comment.