# Prerequisites ### Ubuntu `apt install build-essential libcurl4-gnutls-dev imagemagick eyeD3 flac` ### Other OS * make * g++ * libcurl * imagemagick (convert executable) * eyeD3 executable * metaflac executable # Usage There must be a file named "config.json" in the working directory with your monstercat credentials and other configurations. See config_example.json for the template. Invoke `make` to compile. Requires libcurl. Login via browser and export `cid` cookie to cookies.txt (Netscape format) Invoke `mcat_dl` with catalog ID as extra arguments to download. # Download File Structure ### Release Folder **download_path/Type/YYYY-MM-DD - CatalogID - Artist - Title** * download_path - Set in config.json * Type - Album/EP/Single * YYYY-MM-DD - Release Date in ISO format for easy sorting * Artist/Title - removed featuring artists from "Artist" and added to "Title" ### Cover * Cover(.jpg/.png) - Full resolution from Monstercat * Cover_small.jpg - 750x750 used to tag files ### MP3 and FLAC folders Separate folders if more than 1 track otherwise put in main folder. ### Extended folder This is where extended mixes are put into. They are in their original format. ### File Naming * Title.(mp3/flac) - Used when only 1 track * Number - Title.(mp3/flac) - Used when track artist **matches** release artist * Number - Artist - Title.(mp3/flac) - Used when track artist **does not match** release artist # JSON Library Source https://github.com/nlohmann/json * Release - 3.10.5 * Commit - 4f8fba14066156b73f1189a2b8bd568bde5284c5 # eyeD3 https://eyed3.readthedocs.io/en/latest/ * For MP3 tagging ``` // Common --encoding utf8 --preserve-file-times // First Step - Remove Images --remove-all-images // Second Step - Change what is needed --add-image "...":FRONT_COVER --artist "..." --album "..." --title "..." --track ... ``` # metaflac https://xiph.org/flac/download.html * For FLAC tagging ``` metaflac // Common --preserve-modtime --no-utf8-convert // First Step - Remove Pictures --remove --block-type=PICTURE // Second Step - Remove Tags --remove-tag=TITLE --remove-tag=ARTIST --remove-tag=ALBUM --remove-tag=TRACKNUMBER // Third Step - Add "--import-picture-from=3|image/jpeg|||/path/to/cover" "--set-tag=TITLE=..." "--set-tag=ARTIST=..." "--set-tag=ALBUM=..." "--set-tag=TRACKNUMBER=..." --dont-use-padding file.flac ``` # imagemagick https://imagemagick.org/script/download.php * For Image Resizing ``` convert Cover -resize 750x750 Cover_small.jpg ```