Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/evan-goode/mania

👻 A command-line tool for downloading music from TIDAL
https://github.com/evan-goode/mania

downloader music tidal tidalapi

Last synced: 3 months ago
JSON representation

👻 A command-line tool for downloading music from TIDAL

Awesome Lists containing this project

README

        

# ⚠️ No longer maintained.
Check out https://github.com/yarrm80s/orpheusdl and https://github.com/Dniel97/orpheusdl-tidal instead.

## Mania 👻

Mania is a command-line tool for downloading music from [TIDAL](https://tidal.com). It is intended for educational and private use only, and **not** as a tool for pirating and distributing music.

## Installation

```
pip3 install --user --upgrade "https://github.com/evan-goode/mania/archive/master.zip"
```

Mania requires Python 3.6 or higher and has been tested on GNU/Linux and macOS.

## Usage

Instead of asking for your username and password, Mania now uses TIDAL's TV login process. The first time you run it, it will ask you to link a TIDAL account. Simply follow the link it gives you and log in.

To download a track, an album, or even an artist's entire discography:

```
mania track the great gig in the sky
mania album the dark side of the moon
mania artist pink floyd
```

To include EPs and singles in the discography:

```
mania artist pink floyd --include-eps-singles
```

You can also give it a URL to something in the TIDAL catalog and Mania will try to parse it:

```
mania url https://tidal.com/browse/track/140538043
```

Optional flags can go anywhere in the command. For example, to automatically select the top search result:

```
mania track the great gig in the sky --lucky
```

## Configuration

Each option (except `--config-file`) can be specified either as a command-line argument or using the TOML config file at `~/.config/mania/config.toml`. On the command line, prefix the option with `--`, or `--no-`, as in `--output-directory ~/music` or `--no-full-structure`.

The first time it's run, Mania populates `~/.config/mania/config.toml` with some default values. For more information on the TOML format, see https://github.com/toml-lang/toml.

To point Mania to a different configuration file, use `--config-file `.

Available options are:

- `quality `: default value is `lossless`. Possible values are `master` (MQA in a FLAC container, usually 96 kHz, 24 bit), `lossless` (44.1 kHz, 16 bit FLAC), `high` (~320 kbps VBR AAC), and `low` (~96 kbps VBR AAC). If the content you request isn't available in the specified quality, Mania will try to download the "next best" option (`master` > `lossless` > `high` > `low`). Note that `master` and `lossless` require a TIDAL HiFi subscription.
- `output-directory `: where to put downloaded music. Default value is `.` (your working directory when you run Mania).
- `by-id`: find something using its ID instead of searching TIDAL. For example, `mania album --by-id 79419393`.
- `lucky`: automatically download the top search result. Default value is `false`.
- `search-count `: how many results to include in the search. Default value is `16`.
- `quiet`: don't log any output. Default value is `false`.
- `nice-format`: rename downloaded material to follow kebab-case and strip out special characters. "Maxwell's Silver Hammer (Remastered).mp3" becomes "maxwells-silver-hammer-remastered.mp3". Default value is `false`.
- `full-structure`: always organize content by artist and album. For example, `mania track --full-structure --lucky "isn't she lovely"` would create `Stevie Wonder/Songs In The Key Of Life/Disc 2/01 Isn't She Lovely.flac`. Default value is `false`.
- `skip-metadata`: don't download cover art or set tags. Not sure why someone would want this. Overrides `replay-gain`. Default value is `false`.
- `replay-gain`: tag FLAC files with [ReplayGain](https://en.wikipedia.org/wiki/ReplayGain) data from TIDAL (for normalization). Overridden by `skip-metadata`. Default value is `true`.
- `include-eps-singles`: include EPs and singles when downloading discographies with `mania artist`. Default value is `false`; prolific artists can have a _lot_ of singles/remixes and often you just want the studio albums.
- `track-format`: filename format for tracks. Default value is `{track_number} {track_name}`.
- `individual-track-format`: filename format for tracks when a track is downloaded without the rest of the album. `full-structure` will force the use of the long format. Default value is `{track_name}`
- `album-format`: filename format for albums. Default value is `{album_name}`.
- `individual-album-format`: filename format for albums when an album is downloaded without the rest of the artist's discography. `full-structure` will force the use of the long format. Default value is `{album_name}`, the same as the default `album-format`. These options are kept distinct in case you want to, for example, include the year only for albums in a discography.

### Formatting Variables

The following variables are available for use in the `*-format` options. All are surrounded with `{}`:

- `{track_id}`: the ID of the track in TIDAL
- `{track_name}`
- `{track_artists}`: ", "-delimited list of artists
- `{track_first_artist}`: the first listed artist
- `{track_number}`: number of the track in the album. Automatically zero-padded according to the total number of tracks.
- `{album_id}`: the ID of the album in TIDAL
- `{album_name}`
- `{album_artists}`: comma + delimited list of album artists
- `{album_first_artist}`: the first listed album artist
- `{album_year}`: the year of release, or `Unknown Year`

For example:

```
mania track the great gig in the sky --lucky --individual-track-format "{track_artists} - {track_name} ({album_year})"
```

will download:

```
Pink Floyd - The Great Gig in the Sky (1973).flac
```

## License

[The Unlicense](https://unlicense.org)

## See also

- [tidalapi](https://github.com/tamland/python-tidal)
- [RedSea](https://github.com/Dniel97/RedSea)
- [Tidal-Media-Downloader](https://github.com/yaronzz/Tidal-Media-Downloader/)