Coder Social home page Coder Social logo

mania's Introduction

โš ๏ธ 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. 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 <file>.

Available options are:

  • quality <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 <path>: 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 <number>: 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 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

See also

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.