From f64a543645ac562ac329dc89f441c098aa06c8f4 Mon Sep 17 00:00:00 2001 From: oskvr37 Date: Thu, 1 Aug 2024 16:26:52 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20update=20for=201.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 41 ++++++++++++++++++++++++++++++----------- setup.py | 2 +- tiddl/__init__.py | 2 +- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 1aa8afe..892b1d0 100644 --- a/README.md +++ b/README.md @@ -23,22 +23,39 @@ After installation you can use `tiddl` to set up auth token ```bash $ tiddl -⚙️ Go to https://link.tidal.com/CYARD and add device! -Hit enter when you are ready... -✅ Token good for 7 days +go to https://link.tidal.com/xxxxx and add device! +hit enter when you are ready... +authenticated! +token expires in 7 days ``` Use `tiddl -h` to show help message -# Usage +# CLI -After authentication - when your token is ready - you can start downloading tracks +After authentication - when your token is ready - you can start downloading! + +You can download `tracks` `albums` `playlists` `artists albums` - `tiddl -s -q high` sets high quality as default quality -- `tiddl TRACK_ID` downloads track with high quality -- `tiddl TRACK_ID -q master` downloads track with best possible quality -- `tiddl TRACK_ID -p my_folder -o my_song` downloads track to `my_folder/my_song.flac` -- `tiddl TRACK_ID -p my_folder -o my_song -s` same as above, but saves `my_folder` as default download path +- `tiddl ` downloads with high quality +- `tiddl -q master` downloads with best possible quality +- `tiddl track/284165609 -p my_folder -o my_song` downloads track to `my_folder/my_song.flac` +- `tiddl track/284165609 -p my_folder -o my_song -s` same as above, but saves `my_folder` as default download path + +### Valid input + +- https://tidal.com/browse/track/284165609 +- track/284165609 +- https://listen.tidal.com/album/284165608/track/284165609 +- https://listen.tidal.com/album/284165608 +- album/284165608 +- https://listen.tidal.com/artist/7695548 +- artist/7695548 +- https://listen.tidal.com/playlist/803be625-97e4-4cbb-88dd-43f0b1c61ed7 +- playlist/803be625-97e4-4cbb-88dd-43f0b1c61ed7 + +# Modules You can also use TIDDL as module, it's fully typed so you will get type hints @@ -53,9 +70,11 @@ api = TidalApi( config["user"]["country_code"] ) -my_playlists = api.getPlaylists() +album_id = 284165608 + +album = api.getAlbum(album_id) -print(f"You have got {my_playlists['totalNumberOfItems']} playlists!") +print(f"{album["title"]} has {album["numberOfTracks"]} tracks!") ``` # Resources diff --git a/setup.py b/setup.py index 903e560..424ed54 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="tiddl", - version="1.1.0", + version="1.2.0", description="TIDDL (Tidal Downloader) is a Python CLI application that allows downloading Tidal tracks.", long_description=open('README.md').read(), long_description_content_type='text/markdown', diff --git a/tiddl/__init__.py b/tiddl/__init__.py index 6e1a976..9802ff7 100644 --- a/tiddl/__init__.py +++ b/tiddl/__init__.py @@ -82,7 +82,7 @@ def main(): if not config["token"]: auth = getDeviceAuth() input( - f"⚙️ Go to https://{auth['verificationUriComplete']} and add device!\nHit enter when you are ready..." + f"go to https://{auth['verificationUriComplete']} and add device!\nhit enter when you are ready..." ) # TODO: refresh auth status automatically ✨