Fast, Concurrent, Rust based Tidal-Media-Downloader implementation.

Related tags

Security tools tdl
Overview

tdl

tdl is a rust implementation of the Python Script Tidal-Media-Downloader.

Overview

tdl offers significant performance improvements over the original python script by utilizing asynchronous multi-threaded concurrency.

How much more performant is it?

In basic testing on my laptop without any CPU/Disk contention, tdl can typically complete the same download tasks in half the time, and 3-4x less cpu time.

tdl: 1.44s user 2.02s system 36% cpu 9.480 total

tidal-dl:4.20s user 4.22s system 43% cpu 19.434 total

In situations where there is CPU contention, or very high network throughput this difference can be as high as 20x-50x.

Usage

Getting Started

To setup an auth token, run the below command, and log in via the link output to the terminal

tdl login

To get the possible parameters for any command or sub command, run:

tdl --help
tdl get --help

Get

Get a single item

tdl get <URL>
tdl get https://tidal.com/browse/album/129835816

Get multiple items

tdl get <URL1> <URL2> 
tdl get https://tidal.com/browse/album/129835816 https://tidal.com/browse/album/147102710  

Autocomplete

tdl will generate an autocompletion file for various shells, that can be output to the proper autocomplete directory on your system

Example:

tdl autocomplete -s zsh > $FPATH/tdl.zsh

Config Setup

Configs are stored in ~/.config/tdl/config.toml, and will auto-generate with the default settings when the executable is ran.

download_paths

The download_paths section in config is used to decide where files will be placed in the file system.

base_path will expand env variables along with shell accelerators such as ~. This is the parent folder all files will be placed under.

Each of the following keys will create a nested folder structure in the following template: {base_path}/{artist}/{album}/{track}

Examples:

[download_paths]
base_path = '$HOME/Music'
artist = '{artist_name}'
album = '{album_name} [{album_id}] [{album_release_year}]'
track = '{track_num} - {track_name} - {track_volume}'

Resulting Naming path: /Users/username/Music/100 gecs/1000 gecs [129835816] [2019]/1 - 745 sticky - 1.flac

You can also specify any token under any key so long as it's not a child. A track will be able to use any key from the album or artist. However an album won't be able to use a track key.

Keys can also be left blank to skip folder creation.

[download_paths]
base_path = '$HOME/Music'
artist = ''
album = '{artist_name} - {album_name} [{album_id}] [{album_release_year}]'
track = '[{track_num}] - {artist_name} - {track_name} - {track_volume}'

Resulting Naming path: /Users/username/Music/100 gecs - 1000 gecs [129835816] [2019]/[1] - 100 gecs - 745 sticky - 1.flac

Available Keys:

Artist:

Token Description Example
{artist_name} Artist Name 100 Gecs
{artist_id} Unique ID from Tidal 10828611

Album:

Token Description Example
{album_name} Album Title 1000 Gecs
{album_id} Unique ID from Tidal 192059802
{album_duration} Duration in seconds of Album 3000
{album_tracks} Number of tracks in Album 17
{album_explicit} Shortcode if album is explicit, empty if false E
{album_quality} String literal of audio_quality HI_RES
{album_release} YYYY-MM-DD string of album release date 2020-07-05
{album_release_year} YYYY string of album release 2020

Track:

Token Description Example
{track_id} Unique ID from Tidal 129835817
{track_name} Name of Track 745 Sticky
{track_duration} Track Duration in Seconds 120
{track_num} Number track appears on album 7
{track_volume} Volume number of track, if album includes multiple discs 1
{track_isrc} International Standard Recording Code of track DEZ750500205
{track_explicit} Shortcode if album is explicit, empty if false E
{track_quality} String literal of audio_quality HI_RES

audio_quality

  • audio_quality
    • Quality of downloaded tracks
    • Default:
      • HI_RES
    • Accepted Values:
      • HI_RES
        • (24bit/96kHz MQA encoded FLAC)
      • LOSSLESS
        • (1411kbps|16bit/44.1kHz FLAC/ALAC)
      • HIGH
        • (320kbps AAC)
      • LOW
        • (96kbps AAC)

Concurrency

  • downloads
    • Number of concurrent downloads. Not recommended to set higher than 8.
    • Default:
      • 3
    • Accepted Values:
      • 1..10

download_cover

  • download_cover
    • Download a cover.jpg in an album folder
    • Default:
      • true
    • Accepted Values:
    • true
    • false

Progress

  • show_progress

    • Displays a progress bar when downloading files
    • Default:
      • true
    • Accepted Values:
    • true
    • false
  • progress_refresh_rate

    • Refresh rate in hz of the progress bar, if show_progress is set to true. Reduce this for lower CPU usage.
    • Default:
      • 5
    • Accepted values:
      • 1..255
Comments
  • Adding extra tokens: album artist

    Adding extra tokens: album artist

    Hi, been using tdl recenly and its been super fast and solid on ubuntu. Is there any chance you could add a new token for album artist? This is how I organize my music and it would be great if that exif data could be saved to each track and if I could also use it like {album_artist} so my folders organize nicer.

    I also noticed that the year attribute isnt being saved to each track either, but that might be a different issue.

    opened by poland153 6
  • Downloaded flac files invalid

    Downloaded flac files invalid

    Hi, I've tried downloading two different songs and both have resulted in an unplayable .flac file in the end.

    I've used a simple get command: ./tdl-v0.2.0 get https://tidal.com/browse/track/37896394

    And the resulting file looks like this: x@x:/opt/tdl/Music/TALKING IS HARD (2014)$ ls '8 - Work This Body.flac' x@x:/opt/tdl/Music/TALKING IS HARD (2014)$ ffprobe -hide_banner 8\ -\ Work\ This\ Body.flac Input #0, flac, from '8 - Work This Body.flac': Duration: 00:02:57.63, start: 0.000000, bitrate: 0 kb/s Stream #0:0: Audio: flac, 44100 Hz, stereo, s32 (24 bit)

    I've also tried reducing quality from HI_RES to LOSSLESS, which reduces the resulting file size, but is also unplayable (I already thought that a flac file with <1MB file size looks wrong 😅

    opened by J0n4t4n 6
  • Unable to download albums past 50 tracks

    Unable to download albums past 50 tracks

    When downloading large albums, tracks past 50 will be detected as already existing and not download them. It looks like it's looping around back to the first track instead of continuing with track 51.

    % ./tdl get https://listen.tidal.com/album/201482078
    Getting Track Info for: [1] <Track 1 name>
    Submitting Track to Download Queue: [1] <Track 1 name>
    Download Complete | [1] <Track 1 name>
    ...
    Getting Track Info for: [50] <Track 50 name>
    Submitting Track to Download Queue: [50] <Track 50 name>
    Download Complete | [50] <Track 50 name>
    Getting Track Info for: [1] <Track name 1>
    Submitting Track to Download Queue: [1] <Track name 1>
    File Exists | [1] <Track name 1>
    ...
    Getting Track Info for: [35] <Track 35 name>
    Submitting Track to Download Queue: [35] <Track 35 name>
    File Exists | [35] <Track 35 name>
    

    (lines omitted/altered for brevity)

    Subsequent attempts on the same albums will encounter the same error on the same tracks. This will also affect downloading by artist once it reaches the same album. Changing the number of workers/downloads does not have an affect on the issue, though I was seeing EOF while parsing a value at line 1 column 0 errors.

    If one were to download all the tracks individually they will work just fine, so this is likely the workaround.

    % tdl get https://listen.tidal.com/browse/track/201482079
    ...
    % tdl get https://listen.tidal.com/browse/track/201482163
    
    opened by alextarrell 5
  • Artist Download Error

    Artist Download Error

    Hi,

    I'm trying to download an entire artist, not sure if it's officially supported yet, but I thought I would give it a try. It worked for a few until it got to one and threw an error. The command I'm using is ./tdl get https://listen.tidal.com/artist/19137.

    Error output:

    Access Token Valid
    Getting Artist Albums   thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Error at line 1 column 12942', src/api/media.rs:69:53
    stack backtrace:
       0:     0x55a6cd4195e1 - <unknown>
       1:     0x55a6cd1e374c - <unknown>
       2:     0x55a6cd3f5874 - <unknown>
       3:     0x55a6cd41a5b6 - <unknown>
       4:     0x55a6cd41b646 - <unknown>
       5:     0x55a6cd41b0e2 - <unknown>
       6:     0x55a6cd41b056 - <unknown>
       7:     0x55a6cd41b012 - <unknown>
       8:     0x55a6cd0d6be2 - <unknown>
       9:     0x55a6cd0d6e62 - <unknown>
      10:     0x55a6cd45f998 - <unknown>
      11:     0x55a6cd48a881 - <unknown>
      12:     0x55a6cd4a95f7 - <unknown>
      13:     0x55a6cd4abece - <unknown>
      14:     0x55a6cd498e45 - <unknown>
      15:     0x55a6cd49dffb - <unknown>
      16:     0x55a6cd41c0c5 - <unknown>
      17:     0x7fa5032fa609 - start_thread
      18:     0x7fa5030c8163 - clone
      19:                0x0 - <unknown>
    

    Full log with RUST_LOG=trace enabled.

    [2022-07-28T19:55:00Z DEBUG tdl::login] Attempting to validate access token
    [2022-07-28T19:55:00Z DEBUG reqwest::connect] starting new connection: https://api.tidalhifi.com/
    [2022-07-28T19:55:00Z TRACE mio::poll] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
    [2022-07-28T19:55:00Z TRACE want] signal: Want
    [2022-07-28T19:55:00Z TRACE want] signal found waiting giver, notifying
    [2022-07-28T19:55:00Z TRACE want] poll_want: taker wants!
    [2022-07-28T19:55:00Z TRACE want] signal: Want
    [2022-07-28T19:55:00Z TRACE want] signal: Want
    [2022-07-28T19:55:00Z DEBUG reqwest::async_impl::client] response '200 OK' for https://api.tidalhifi.com/v1/sessions
    Access Token Valid
    [2022-07-28T19:55:00Z TRACE want] signal: Want
    Getting Artist Albums                                                                                                                                                                      [2022-07-28T19:55:00Z DEBUG reqwest::connect] starting new connection: https://api.tidal.com/
    [2022-07-28T19:55:00Z DEBUG reqwest::connect] starting new connection: https://api.tidal.com/
    [2022-07-28T19:55:00Z TRACE mio::poll] registering event source with poller: token=Token(2), interests=READABLE | WRITABLE
    [2022-07-28T19:55:00Z TRACE mio::poll] registering event source with poller: token=Token(3), interests=READABLE | WRITABLE
    [2022-07-28T19:55:00Z TRACE want] signal: Want
    [2022-07-28T19:55:00Z TRACE want] signal found waiting giver, notifying
    [2022-07-28T19:55:00Z TRACE want] poll_want: taker wants!
    [2022-07-28T19:55:00Z TRACE want] signal: Want
    [2022-07-28T19:55:00Z TRACE want] signal found waiting giver, notifying
    [2022-07-28T19:55:00Z TRACE want] poll_want: taker wants!
    [2022-07-28T19:55:01Z DEBUG reqwest::async_impl::client] response '200 OK' for https://api.tidal.com/v1/artists/19137/albums?limit=50&offset=0&countryCode=US
    [2022-07-28T19:55:01Z TRACE want] signal: Want
    [2022-07-28T19:55:01Z TRACE want] signal found waiting giver, notifying
    [2022-07-28T19:55:01Z TRACE want] signal: Want
    [2022-07-28T19:55:01Z TRACE want] poll_want: taker wants!
    [2022-07-28T19:55:01Z DEBUG tdl::api] {"limit":50,"offset":0,"totalNumberOfItems":18,"items":[{"id":160076435,"title":"POST HUMAN: SURVIVAL HORROR","duration":1932,"streamReady":true,"streamStartDate":"2020-10-30T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":9,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2020-10-30","copyright":"(P) 2020 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/160076435","cover":"a34e046e-5ca9-418f-87d5-a536966ce596","vibrantColor":"#d999af","videoCover":null,"explicit":true,"upc":"886448602200","popularity":45,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":164297268,"title":"POST HUMAN: SURVIVAL HORROR","duration":1931,"streamReady":true,"streamStartDate":"2020-12-03T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":9,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2020-10-30","copyright":"(P) 2020 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/164297268","cover":"5f7cfe77-13ac-4d34-8cf7-b7a0778b30a0","vibrantColor":"#d999af","videoCover":null,"explicit":false,"upc":"886448910428","popularity":5,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":160515739,"title":"POST HUMAN: SURVIVAL HORROR","duration":1932,"streamReady":true,"streamStartDate":"2020-10-30T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":9,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2020-10-30","copyright":"(P) 2020 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/160515739","cover":"4d4fbcf1-af50-485f-8422-d43265c370ae","vibrantColor":"#d999af","videoCover":null,"explicit":true,"upc":"886448846390","popularity":18,"audioQuality":"LOW","audioModes":["SONY_360RA"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":165492381,"title":"Live at the Royal Albert Hall","duration":5012,"streamReady":true,"streamStartDate":"2020-12-18T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":16,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2020-10-28","copyright":"(P) 2020 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/165492381","cover":"46922d26-c7e9-442a-a84d-a3f95236e002","vibrantColor":"#9e4243","videoCover":null,"explicit":false,"upc":"886448959434","popularity":14,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":176307422,"title":"Live at the Royal Albert Hall","duration":4982,"streamReady":true,"streamStartDate":"2021-03-12T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":16,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2020-10-28","copyright":"(P) 2021 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/176307422","cover":"66cc908f-0df1-45bb-9ace-7402e0d938e4","vibrantColor":"#9e4243","videoCover":null,"explicit":false,"upc":"886448988700","popularity":3,"audioQuality":"LOW","audioModes":["SONY_360RA"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":126396297,"title":"Music to listen to~dance to~blaze to~pray to~feed to~sleep to~talk to~grind to~trip to~breathe to~help to~hurt to~scroll to~roll to~love to~hate to~learn Too~plot to~play to~be to~feel to~breed to~sweat to~dream to~hide to~live to~die to~GO TO","duration":4533,"streamReady":true,"streamStartDate":"2019-12-27T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":8,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2019-12-27","copyright":"(P) 2019 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/126396297","cover":"659f6902-864e-487d-a7c9-7c2488501454","vibrantColor":"#984a41","videoCover":null,"explicit":true,"upc":"886448213192","popularity":19,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":102519387,"title":"amo","duration":3119,"streamReady":true,"streamStartDate":"2019-01-25T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":13,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2019-01-25","copyright":"(P) 2019 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/102519387","cover":"743df668-55eb-445c-abf7-f24c67049f30","vibrantColor":"#c4af24","videoCover":null,"explicit":true,"upc":"886447279588","popularity":42,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":103198350,"title":"amo","duration":3119,"streamReady":true,"streamStartDate":"2020-09-16T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":13,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2019-01-25","copyright":"(P) 2019 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/103198350","cover":"86076c01-a7c3-43aa-8e70-57b52b7246f2","vibrantColor":"#c4af24","videoCover":null,"explicit":false,"upc":"886447526255","popularity":4,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":121133400,"title":"2004 - 2013","duration":3978,"streamReady":true,"streamStartDate":"2017-11-24T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":15,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2017-11-24","copyright":"Visible Noise / Sony Music Entertainment UK Ltd., under exclusive license to Epitaph","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/121133400","cover":"df3721f1-6a47-49f5-8aed-01e34d0b0609","vibrantColor":"#FFFFFF","videoCover":null,"explicit":true,"upc":"0045778756063","popularity":7,"audioQuality":"LOSSLESS","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":50793895,"title":"That's The Spirit","duration":2703,"streamReady":true,"streamStartDate":"2015-09-11T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":11,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2015-09-11","copyright":"(P) 2015 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/50793895","cover":"bc9e6d77-e0fd-4c0d-a6f9-ff33fa07184b","vibrantColor":"#FFFFFF","videoCover":null,"explicit":true,"upc":"886445386097","popularity":58,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":152008773,"title":"That's The Spirit","duration":2706,"streamReady":true,"streamStartDate":"2020-08-17T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":11,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2015-09-11","copyright":"(P) 2015 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/152008773","cover":"cf139ba0-4ea9-4ddb-90d4-e575a63042be","vibrantColor":"#FFFFFF","videoCover":null,"explicit":false,"upc":"886445388244","popularity":3,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":211802103,"title":"Sempiternal (Deluxe)","duration":3967,"streamReady":true,"streamStartDate":"2021-04-01T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":13,"numberOfVideos":1,"numberOfVolumes":1,"releaseDate":"2013-04-01","copyright":"(P) 2013 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/211802103","cover":"cb3faefe-81a2-4bad-a5c3-9d06074b17b5","vibrantColor":"#ac8025","videoCover":null,"explicit":true,"upc":"886443859111","popularity":4,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":19291979,"title":"Sempiternal (Expanded Edition)","duration":3218,"streamReady":true,"streamStartDate":"2021-04-01T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":13,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2013-04-01","copyright":"(P) 2013 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/19291979","cover":"f49be36d-4032-4c61-b1aa-85b9b0833e18","vibrantColor":"#ae8637","videoCover":null,"explicit":true,"upc":"886443690707","popularity":56,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":19440652,"title":"Sempiternal","duration":2736,"streamReady":true,"streamStartDate":"2021-04-01T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":11,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2013-04-01","copyright":"(P) 2013 Sony Music Entertainment UK Limited","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/19440652","cover":"feaef112-ec93-4848-8050-928be7e4de80","vibrantColor":"#ac8025","videoCover":null,"explicit":true,"upc":"886443690714","popularity":14,"audioQuality":"HI_RES","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":121131541,"title":"There Is A Hell Believe Me I've Seen It. There Is A Heaven Let's Keep It A Secret","duration":3177,"streamReady":true,"streamStartDate":"2010-10-05T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":12,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2010-10-05","copyright":"Visible Noise Ltd. Under Exclusive License To Epitaph.","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/121131541","cover":"a1010f2e-5a36-40c0-a8dd-840bf606d12e","vibrantColor":"#d6bf94","videoCover":null,"explicit":true,"upc":"0045778706563","popularity":24,"audioQuality":"LOSSLESS","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":121131302,"title":"Suicide Season (Deluxe Edition)","duration":6317,"streamReady":true,"streamStartDate":"2010-04-13T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":24,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2008-01-01","copyright":"Visible Noise Ltd. Under Exclusive License To Epitaph","type":"ALBUM","version":"Deluxe Edition","url":"http://www.tidal.com/album/121131302","cover":"0a6ff36a-1eef-448c-b02f-9dee2c3c520d","vibrantColor":"#d5e2a5","videoCover":null,"explicit":true,"upc":"0045778705160","popularity":18,"audioQuality":"LOSSLESS","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":121129402,"title":"Suicide Season","duration":2535,"streamReady":true,"streamStartDate":"2008-09-30T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":10,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2008-01-01","copyright":"Visible Noise Limited Under Exclusive License To Epitaph","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/121129402","cover":"a033df3b-b4cb-45bd-83c4-69edc18588c4","vibrantColor":"#dd7467","videoCover":null,"explicit":true,"upc":"0045778700660","popularity":24,"audioQuality":"LOSSLESS","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]},{"id":121132771,"title":"Count Your Blessings","duration":2176,"streamReady":true,"streamStartDate":"2013-11-26T00:00:00.000+0000","allowStreaming":true,"premiumStreamingOnly":false,"numberOfTracks":10,"numberOfVideos":0,"numberOfVolumes":1,"releaseDate":"2006-10-30","copyright":"Visible Noise Limited, under exclusive license to Epitaph","type":"ALBUM","version":null,"url":"http://www.tidal.com/album/121132771","cover":"383c039c-5a3a-4a3a-9dfd-d6a639572f80","vibrantColor":"#9adde9","videoCover":null,"explicit":true,"upc":"0045778727964","popularity":18,"audioQuality":"LOSSLESS","audioModes":["STEREO"],"artist":{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"},"artists":[{"id":19137,"name":"Bring Me The Horizon","type":"MAIN","picture":"c34fb076-fc13-4b96-a89a-0e89750c7377"}]}]}
    thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Error at line 1 column 2320', src/api/media.rs:69:53
    stack backtrace:
    [2022-07-28T19:55:01Z TRACE want] signal: Want
       0:     0x56335c6305e1 - <unknown>
       1:     0x56335c3fa74c - <unknown>
       2:     0x56335c60c874 - <unknown>
       3:     0x56335c6315b6 - <unknown>
       4:     0x56335c632646 - <unknown>
       5:     0x56335c6320e2 - <unknown>
       6:     0x56335c632056 - <unknown>
       7:     0x56335c632012 - <unknown>
       8:     0x56335c2edbe2 - <unknown>
       9:     0x56335c2ede62 - <unknown>
      10:     0x56335c676998 - <unknown>
      11:     0x56335c6a1881 - <unknown>
      12:     0x56335c6c05f7 - <unknown>
      13:     0x56335c6c2ece - <unknown>
      14:     0x56335c6afe45 - <unknown>
      15:     0x56335c6b4ffb - <unknown>
      16:     0x56335c6330c5 - <unknown>
      17:     0x7fd43a8c7609 - start_thread
      18:     0x7fd43a695163 - clone
      19:                0x0 - <unknown>
    [2022-07-28T19:55:01Z TRACE mio::poll] deregistering event source from poller
    [2022-07-28T19:55:01Z TRACE mio::poll] deregistering event source from poller
    [2022-07-28T19:55:01Z TRACE want] signal: Closed
    [2022-07-28T19:55:01Z TRACE want] signal: Closed
    [2022-07-28T19:55:01Z TRACE mio::poll] deregistering event source from poller
    [2022-07-28T19:55:01Z TRACE want] signal: Closed
    
    opened by Zibbp 3
  • Error compiling with `cargo build`

    Error compiling with `cargo build`

    Tried to compile. Updated rustc and cargo to most recent with rustup. I'm not a rust coder so don't really know much about the likely causes.

    ❯ cargo build
       Compiling tdl v0.3.0 (/home/sparky/Applications/tdl)
    error[E0277]: expected a `Fn<(Request, &'a mut task_local_extensions::extensions::Extensions, reqwest_middleware::Next<'a>)>` closure, found `Cache<CACacheManager>`
      --> src/api/mod.rs:56:15
       |
    56 |         .with(Cache(cache_policy))
       |          ---- ^^^^^^^^^^^^^^^^^^^ expected an `Fn<(Request, &'a mut task_local_extensions::extensions::Extensions, reqwest_middleware::Next<'a>)>` closure, found `Cache<CACacheManager>`
       |          |
       |          required by a bound introduced by this call
       |
       = help: the trait `for<'a> Fn<(Request, &'a mut task_local_extensions::extensions::Extensions, reqwest_middleware::Next<'a>)>` is not implemented for `Cache<CACacheManager>`
       = help: the trait `reqwest_middleware::Middleware` is implemented for `RetryTransientMiddleware<T>`
       = note: required for `Cache<CACacheManager>` to implement `reqwest_middleware::Middleware`
    note: required by a bound in `reqwest_middleware::ClientBuilder::with`
      --> /home/sparky/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-middleware-0.1.6/src/client.rs:37:12
       |
    37 |         M: Middleware,
       |            ^^^^^^^^^^ required by this bound in `reqwest_middleware::ClientBuilder::with`
    
    For more information about this error, try `rustc --explain E0277`.
    error: could not compile `tdl` due to previous error
    
    opened by cortices 2
  • Stalled threads during downloads.

    Stalled threads during downloads.

    When downloading more than one album at a time, after about 3-4 albums are done downloading, threads die from rate limits from the tidal servers, resulting in many albums only having certain songs be downloaded. I will be implementing an option to sleep between album downloads in a future PR.

    Confirmed by @popeye2468 further in the comments on #26.

    opened by cleonyc 1
  • Removed offset adjustment from limit calculation

    Removed offset adjustment from limit calculation

    The number of result items should be capped to the item limit (either the total number of items reported by the json or to some arbitrary max value). Subtracting the offset value from that limit would effectively cap the results early once the offset exceeded the number of results retrieved.

    Ex. Retrieving 60 total items with a 50 item limit and no max cap:

    1. item_limit is 60, offset is 0, there are 50 items in the response. Old effective cap is (60-0) 50, new effective cap is 50. We retrieve and add all 50 items to the results. Let's increase the offset and retrieve the next batch.
    2. item_limit is 60, offset is 50, there are 10 items in the response. Old effective cap is (60-50) 10, new effective cap is still 50. With the old effective cap we simply stop and return the 50 items we had already retrieved. With the new effective cap we retrieve and add all 10 items to the results, then return with the full 60 results.
    opened by alextarrell 1
  • Login url 0m appended

    Login url 0m appended

    Hi, I've just tried tdl for the first time and using the login command I got an invalid URL. After looking at it I found that something seems to always append "0m" to the end of the URL.

    Examples: Please Login to Tidal: https://link.tidal.com/DTRBT0m Please Login to Tidal: https://link.tidal.com/UDLES0m

    Removing the 0m makes the url valid.

    opened by J0n4t4n 1
  • Better Handling for Failed/Timed Out Requests from Tidal

    Better Handling for Failed/Timed Out Requests from Tidal

    When a Getting Track Details task times out or fails, it just gets stuck, it doesn't produce any feedback for the user. This results in a confusing error that only appears once you look at the files being downloaded. Might be a good idea to implement a timeout and retry for this step, and if that's not feasible, then at least having some feedback and (maybe, lmk if this is a good idea) stopping the download entirely might work best.

    enhancement 
    opened by cleonyc 5
  • Download not working due to missing field Error

    Download not working due to missing field Error

    Hello,

    tdl fails to download the album ID 31789384 for some reason.

    https://tidal.com/browse/album/31789384

    Access Token Valid
    missing field `limit` at line 1 column 74
    

    I am not sure if this is caused because there are tracks with the same track number in the album (probably pertaining to different CDs)

    opened by rubenmdh 0
  • Periods in the track name truncate the output filename

    Periods in the track name truncate the output filename

    Filenames are getting truncated after the first period. The logs indicate that internally the tracks are being parsed properly, so it's likely breaking when it goes to assemble the final filename.

    Here's an example album.

    This is what the first track from that album ends up being saved as:

    1-1 - It looks like scarlet devil -LNBBC Remix-(feat.flac
    

    Here's what that same track is being logged as:

    [1] Hachimitsu-Lemon - It looks like scarlet devil -LNBBC Remix-(feat.Mitsuki Nakae)
    

    Here's the relevant section from my local config:

    [download_paths]
    base_path = '$HOME/Music'
    artist = ''
    album = '{album_name} [{album_quality}-{album_id}] [{album_release_year}] ({album_tracks})'
    track = '{track_volume}-{track_num} - {track_name} - {artist_name} [{track_id}]'
    
    opened by alextarrell 0
  • Add support for {volume_number} token?

    Add support for {volume_number} token?

    It'd be very handy to support a {volume_number} token for albums that consist of multiple disks, such as https://listen.tidal.com/album/3972630. Currently I'm ending up with '1-100%.flac' (debug shows "trackNumber":1,"volumeNumber":1) and '1-Is It My Body.flac' (debug shows "trackNumber":1,"volumeNumber":2), which is annoying.

    And while I'm complaining, is there any easy way to format the {track_num} token as %02d instead of %d?

    Otherwise...wow! This is a great project. Very handy.

    opened by sn-guthub 2
Releases(v0.3.0)
Owner
null
A fast, simple, recursive content discovery tool written in Rust.

A simple, fast, recursive content discovery tool written in Rust ?? Releases ✨ Example Usage ✨ Contributing ✨ Documentation ?? ?? What the heck is a f

epi 3.6k Dec 30, 2022
Secure and fast microVMs for serverless computing.

Our mission is to enable secure, multi-tenant, minimal-overhead execution of container and function workloads. Read more about the Firecracker Charter

firecracker-microvm 20.3k Jan 1, 2023
Dangerously fast dns/network/port scanner, all-in-one

Skanuvaty Dangerously fast dns/network/port scanner, all-in-one. Start with a domain, and we'll find everything about it. Features: Finds subdomains f

CCCC 701 Dec 31, 2022
The Heros NFT Marketplace Boilerplate project is designed to let users fork, customize, and deploy their own nft marketplace app to a custom domain, ultra fast.

Heros NFT on Solana The Heros NFT Marketplace Boilerplate project is designed to let users fork, customize, and deploy their own nft marketplace app t

nightfury 6 Jun 6, 2022
Brave's Rust-based adblock engine

Ad Block engine in Rust Native Rust module for Adblock Plus syntax (e.g. EasyList, EasyPrivacy) filter parsing and matching. It uses a tokenisation ap

Brave Software 961 Jan 5, 2023
Automated property based testing for Rust (with shrinking).

quickcheck QuickCheck is a way to do property based testing using randomly generated input. This crate comes with the ability to randomly generate and

Andrew Gallant 2k Dec 27, 2022
Lightweight slowloris (HTTP DoS) implementation in Rust.

slowlorust Lightweight slowloris (HTTP DoS) implementation in Rust. Slowloris is a denial-of-service attack program which allows an attacker to overwh

Michael Van Leeuwen 6 Sep 29, 2022
A paseto implementation in rust.

Paseto Rust Paseto is everything you love about JOSE (JWT, JWE, JWS) without any of the many design deficits that plague the JOSE standards. This is d

Instructure, Inc. 145 Nov 7, 2022
OpenSK is an open-source implementation for security keys written in Rust that supports both FIDO U2F and FIDO2 standards.

OpenSK This repository contains a Rust implementation of a FIDO2 authenticator. We developed OpenSK as a Tock OS application. We intend to bring a ful

Google 2.4k Jan 7, 2023
Userspace WireGuard® Implementation in Rust

BoringTun BoringTun is an implementation of the WireGuard® protocol designed for portability and speed. BoringTun is successfully deployed on millions

Cloudflare 4.8k Jan 4, 2023
Rust implementation of The Update Framework (TUF)

rust-tuf A Rust implementation of The Update Framework (TUF). Full documentation is hosted at docs.rs. Warning: Beta Software This is under active dev

heartsucker 152 Dec 11, 2022
A pure-Rust implementation of various threshold secret sharing schemes

Threshold Secret Sharing Efficient pure-Rust library for secret sharing, offering efficient share generation and reconstruction for both traditional S

Snips 137 Dec 29, 2022
A Rust implementation of the Message Layer Security group messaging protocol

Molasses An extremely early implementation of the Message Layer Security group messaging protocol. This repo is based on draft 4 of the MLS protocol s

Trail of Bits 109 Dec 13, 2022
Rust implementation of the H3 geospatial indexing system.

h3o Rust implementation of the H3 geospatial indexing system. Design This is not a binding of the reference implementation, but a reimplementation fro

Hydronium Labs 196 Jan 31, 2023
delegated, decentralized, capabilities based authorization token

Biscuit authentication/authorization token Goals Biscuit is an authentication and authorization token for microservices architectures with the followi

null 580 Jan 1, 2023
A utility like pkg-audit for Arch Linux. Based on Arch Security Team data.

arch-audit pkg-audit-like utility for Arch Linux. Based on data from security.archlinux.org collected by the awesome Arch Security Team. Installation

Andrea Scarpino 316 Nov 22, 2022
a grammar based feedback fuzzer

Nautilus NOTE: THIS IS AN OUTDATE REPOSITORY, THE CURRENT RELEASE IS AVAILABLE HERE. THIS REPO ONLY SERVES AS A REFERENCE FOR THE PAPER Nautilus is a

Chair for Sys­tems Se­cu­ri­ty 157 Oct 26, 2022
radare2-based decompiler and symbol executor

Radeco A radare2 based binary analysis framework consisting from the Radeco client, in ./radeco/ directory, ./radeco-lib/ - library where whole high-l

radare org 349 Dec 28, 2022
🥸P2P gossip network for update transparency, based on pgp 🥸

apt-swarm An attempt to make a secure public p2p protocol that gossips about signed InRelease files to implement an update transparency log. Running a

null 10 Mar 4, 2023