:guitar: :notes: A music downloader that understands your metadata needs.
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
A music scraper that understands your metadata needs.
irsis a command-line application that downloads audio and metadata in order to package an mp3 with both. Extensible, the user can download individual songs, entire albums, or playlists from Spotify.
~ $ irs -h
Usage: irs [--help] [--version] [--install] [-s -a ] [-A -a ] [-p -a ]
Arguments: -h, --help Show this help message and exit -v, --version Show the program version and exit -i, --install Download binaries to config location -c, --config Show config file location -a, --artist Specify artist name for downloading -s, --song Specify song name to download -A, --album Specify the album name to download -p, --playlist Specify the playlist name to download -u, --url Specify the youtube url to download from (for single songs only) -g, --give-url Specify the youtube url sources while downloading (for albums or playlists only only)
Examples: $ irs --song "Bohemian Rhapsody" --artist "Queen" # => downloads the song "Bohemian Rhapsody" by "Queen" $ irs --album "Demon Days" --artist "Gorillaz" # => downloads the album "Demon Days" by "Gorillaz" $ irs --playlist "a different drummer" --artist "prakkillian" # => downloads the playlist "a different drummer" by the user prakkillian
Just download the latest release for your platform here.
Note that the binaries right now have only been tested on WSL. They should run on most linux distros, and OS X, but if they don't please make an issue above.
If you're one of those cool people who compiles from source
git clone https://github.com/cooperhammond/irs)
.yamlconfig file somewhere on your system (usually
yaml binary_directory: ~/.irs/bin music_directory: ~/Music client_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX client_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX single_folder_playlist: enabled: true retain_playlist_order: true unify_into_album: false
IRS_CONFIG_LOCATIONpointing to that file
CREATE A CLIENT ID
irs --installand answer the prompts!
You should be good to go! Run the file from your command line to get more help on usage or keep reading!
You may have noticed that there's a config file with more than a few options. Here's what they do:
yaml binary_directory: ~/.irs/bin music_directory: ~/Music client_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX client_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX single_folder_playlist: enabled: true retain_playlist_order: true unify_into_album: false-
binary_directory: a path specifying where the downloaded binaries should be placed -
music_directory: a path specifying where downloaded mp3s should be placed. Note that there will be more structure created inside that folder, usually in the format of
client_key: a client key from your spotify API application -
client_secret: a client secret key from your spotify API application -
single_folder_playlist/enabled: if set to true, all mp3s from a downloaded playlist will be placed in the same folder. -
single_folder_playlist/retain_playlist_order: if set to true, the track numbers of the mp3s of the playlist will be overwritten to correspond to their place in the playlist -
single_folder_playlist/unify_into_album: if set to true, will overwrite the album name and album image of the mp3 with the title of your playlist and the image for your playlist respectively
At it's core
irsdownloads individual songs. It does this by interfacing with the Spotify API, grabbing metadata, and then searching Youtube for a video containing the song's audio. It will download the video using
youtube-dl, extract the audio using
ffmpeg, and then pack the audio and metadata together into an MP3.
From the core, it has been extended to download the index of albums and playlists through the spotify API, and then iteratively use the method above for downloading each song.
It used to be in python, but 1. I wasn't a fan of python's limited ability to distribute standalone binaries 1. It was a charlie foxtrot of code that I made when I was little and I wanted to refine it 1.
crystal-langmade some promises and I was interested in seeing how well it did (verdict: if you're building high-level tools you want to run quickly and distribute, it's perfect)
Any and all contributions are welcome. If you think of a cool feature, send a PR or shoot me an email. If you think something could be implemented better, please shoot me an email. If you like what I'm doing here, pretty please shoot me an email.
git checkout -b my-new-feature)
git commit -am 'Add some feature')
git push origin my-new-feature)