Skip to content

Commit

Permalink
✨ add playlist downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
oskvr37 committed Aug 1, 2024
1 parent 568f1fb commit 29591f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tiddl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,14 @@ def downloadAlbum(album_id: str | int):
for album in artist_albums["items"]:
downloadAlbum(album["id"])

case "playlist":
# TODO: add option to limit and set offset of playlist ✨
playlist = api.getPlaylistItems(input_id)
for item in playlist["items"]:
downloadTrack(item["item"]["id"], item["item"]["title"])

case _:
logger.info(f"`{input_type}` is not supported yet")
logger.warning(f"invalid input: `{input_type}`")


if __name__ == "__main__":
Expand Down

0 comments on commit 29591f2

Please sign in to comment.