Skip to content

devicelocksmith/Tidal-Media-Downloader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

759 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


This is a personal fork. Some features I don't use may not work. Feel free to use it, but I’m not accepting feature requests.
[GUI-REPOSITORY]

Tidal-Media-Downloader

Tidal-Media-Downloader

«Tidal-Media-Downloader» is an application that lets you download videos and tracks from Tidal. It supports two version: tidal-dl and tidal-gui. (This repository only contains tidal-dl, and the release isn't the newest gui version.)
Download | Documentation | 中文文档 |

📺 Installation

pip3 install tidal-dl --upgrade
USE FUNCTION
tidal-dl Show interactive interface
tidal-dl -h Show help-message
tidal-dl -l "https://tidal.com/browse/track/70973230" Download link
tidal-dl -g Show simple-gui

If you are using windows system, you can use tidal-pro

Nightly Builds

Download nightly builds from continuous integration: Build Status

🤖 Features

  • Download album \ track \ video \ playlist \ artist-albums

  • Add metadata to songs with automatic FLAC cover-art normalisation (requires ffmpeg and metaflac in PATH)

  • Selectable video resolution and track quality, including DASH manifests for compatible playback apps

  • PKCE login flow support for secure keyless authentication

  • Optional listener mode for remote-triggered downloads secured by a shared secret

🔐 Using PKCE credentials

PKCE-based authentication lets you log in without storing the TIDAL device client secret locally. To use it:

  1. Pick a PKCE-capable API key. Start tidal-dl, choose menu option 7 (Change API Key), and pick an entry that lists supportsPkce = True (the bundled “TV” key is index 3). The selected index is stored in ~/.tidal-dl.json under apiKeyIndex, so you can also edit the config file manually if you prefer.
  2. (Optional) Override the API credentials. Menu option 10 (Configure custom API settings) lets you supply your own clientId, client secret, and PKCE endpoints/scope. The overrides are saved alongside the rest of the user configuration.
  3. Begin the PKCE login flow. From the main menu choose option 8 (Login via PKCE). The CLI prints an authorization URL—open it in your browser and approve access. While you wait for the redirect you can either copy the final URL manually or let an automation post it to the temporary endpoint the CLI exposes (it prints something like http://127.0.0.1:8123/pkce, or whichever port you configured for listener mode).
  4. Provide the redirect URL to tidal-dl. Paste it when prompted or POST the JSON payload from the Chrome extension/bridge script to /pkce. The downloader exchanges the code for tokens and saves them to ~/.tidal-dl.token.json. Future sessions reuse the stored refresh token automatically until it expires or you change API keys.

If your current API key does not support PKCE the CLI falls back to the regular device-code login. Switch keys first or edit apiKeyIndex to continue using PKCE.

💽 User Interface

image

image-20220708105823257

image-20200806013705425

🔊 Listener Mode

The command-line interface exposes a small HTTP listener that mirrors the companion script shared above. Enable it from the interactive settings screen (tidal-dl → option 6) or by editing the config file, then launch it with:

tidal-dl --listen

The listener binds to 127.0.0.1 on port 8123 by default and requires POST requests to /run or /run_sync to include the X-Auth header set to your configured secret. You can change both the port and secret from the settings menu. When a request arrives the downloader attempts the current quality first and retries once at HiFi if the initial download fails.

See docs/http-endpoints.md for detailed information on the /pkce, /run, and /run_sync endpoints, including authentication requirements and example payloads.

If your automation already has a valid bearer token you can pass it either as an Authorization: Bearer <token> header or in the JSON payload as {"bearerAuthorization": "<token>"} and the listener will reuse it for that download, falling back to the stored login afterwards.

Log output is appended to ~/tidal-dl-listener.txt so you can audit activity initiated via the listener.

Settings - Possible Tags

Album

Tag Example value
{ArtistName} The Beatles
{AlbumArtistName} The Beatles
{Flag} M/A/E (Master/Dolby Atmos/Explicit)
{AlbumID} 55163243
{AlbumYear} 1963
{AlbumTitle} Please Please Me (Remastered)
{AudioQuality} LOSSLESS
{DurationSeconds} 1919
{Duration} 31:59
{NumberOfTracks} 14
{NumberOfVideos} 0
{NumberOfVolumes} 1
{ReleaseDate} 1963-03-22
{RecordType} ALBUM
{None}

Track

Tag Example Value
{TrackNumber} 01
{ArtistName} The Beatles
{ArtistsName} The Beatles
{TrackTitle} I Saw Her Standing There (Remastered 2009)
{ExplicitFlag} (Explicit)
{AlbumYear} 1963
{AlbumTitle} Please Please Me (Remastered)
{AudioQuality} LOSSLESS
{DurationSeconds} 173
{Duration} 02:53
{TrackID} 55163244

Video

Tag Example Value
{VideoNumber} 00
{ArtistName} DMX
{ArtistsName} DMX, Westside Gunn
{VideoTitle} Hood Blues
{ExplicitFlag} (Explicit)
{VideoYear} 2021
{TrackID} 188932980

☕ Support

If you really like my projects and want to support me, you can buy me a coffee and star this project.

Buy Me A Coffee

🎂 Contributors

This project exists thanks to all the people who contribute.

🎨 Libraries and reference

📜 Disclaimer

  • Private use only.
  • Need a Tidal-HIFI subscription.
  • You should not use this method to distribute or pirate music.
  • It may be illegal to use this in your country, so be informed.

Developing

pip3 uninstall tidal-dl
pip3 install -r requirements.txt --user
python3 setup.py install

About

Download 'TIDAL' Music On Windows/Linux/MacOs (PYTHON/C#)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%