Download high quality (320kbps) songs from ********. Songs may have lower qualities if high quality is unavailable on ******** itself. Simple Usage : Run music-dl.exe as a normal application or from command prompt either as "music-dl" or as "music-dl query" e.g. music-dl link Advanced Usage : music-dl query --arguments e.g. music-dl link --dd "Himesh Hits" e.g. music-dl link --redownload +c --pb-transition \\n\\t query can be a song/album/playlist link or file or --last. Use --last for continuing earlier downloads. Note that you have to provide all the relevant command line arguments again when you use --last. Jsonify is a task that gives the information of a link. If --last is provided, music-dl will not download jsons if it failed earlier. If jsonfiy has failed earlier, then don't use --last. The file can be of three types : 1. file contains any combination of song/album/playlist links (one link per line). 2. file contains jsonified information of songs that is generated by music-dl itself. 3. file contains the body of the ******** webpage. music-dl can extract only song links from the ******** webpage body. ******** doesn't allow us to add songs to a playlist efficiently. So you can download songs from a particular webpage by extracting the song links from the webpage body using music-dl. If the webpage is an artist or playlist page, download the body by saving the Webpage as (HTML only). If the webpage is a search page, then copy the webpage body in a file by inspect element. You need to only download the webpage body if you have set json source as ******** and playlist have more than 500 songs or jsonify is failing with ******** as json source, or you have set ******** as json source. Read json source for more information. ___________________________________________________ Source Directory (sd) : music-dl has a source directory where the application itself is present along with some tools it uses. The source directory is not the sources folder, but is the directory where the sources folder is present i.e. if the sources folder is present in E:\music-dl, then the source directory is E:\music-dl, not E:\music-dl\sources. Source Directory (sd) is not an argument/parameter, so it can't be changed. ___________________________________________________ Arguments/Parameters : There are a lot of parameters that can be set by using -- or ++, - or + before the parameter name. There are parameters that are flags. A flag can either be 1 or 0. Use -- or ++ for a parameter which is denoted by more than two characters and - or + for a parameter which is denoted by a single character. -- before a parameter will either set it 1 if it's a flag or you can provide the value of the parameter as [--parameter value] for a non-flag parameter. -- or - sets a flag parameter as 1 and ++ or + sets a flag parameter as 0. There are two ways of setting the parameters, one is the command line and the other is the config file (config.txt in sources folder). There are three parameters that can't be set by the config file and you must have to only use the command line. You can set the value of parameters that are settable by config file by writing parameter=parameter-value. e.g. dd=E:\songs. Please don't put any extra space or any other character in the config file. The parameters of the config file are processed line by line. The config file is used because it will be a very bad task to provide the parameters every time when you use music-dl. You set the parameters according to your need. The path of the config file can't be changed and it is sd\sources\config.txt. The parameters are listed as parameter : parameter-name (parameter-type, default-value). When the parameter-type is a flag, then the parameter-values can be only 0 or 1. If the parameter-type is a string, then the parameter-values can be any valid text. If the parameter-type is an int, then the parameter-values can be any valid number. The parameter-value validity depends on the parameter itself. The three parameters which can only be set by command line are : 1. config : Config (flag, 0) - Set it 1 to set the parameters from the config file. e.g. music-dl query --config music-dl query ++config 2. permanent-config : Permanent Config (flag, 0) When it's 1, music-dl will use the config file for setting the parameters for future runs so that you don't have to provide --config every time. When it's 0, music-dl will not use the config file for setting the parameters for future runs. Note : permanent-config doesn't change the config flag for the current run. Also, you can always set config as 1 or 0 even when permanent-config is 0/1. --config in every case will set config as 1 and ++config will set config as 0. e.g. music-dl query --config --permanent-config, will set config as 1 for the current run and also for future runs. music-dl query --config ++permanent-config, will set config as 1 for the current run and 0 for future runs. 3. dir-ren : Directory Renaming (flag, 0) You can use directory renaming for renaming the songs/files of a directory. Directory renaming also needs other parameters but you must have to set dir-ren as 1 for directory renaming. You can't download songs and use directory renaming simultaneously. You can't rename the songs that are being downloaded by directory renaming. There are two types of renaming, one is renaming of the songs that are being downloaded and the other is the files/songs already present in a directory. ___________________________________________________ Config File Parameters : 01. dd : Download Directory (string, downloaded) - Path of directory for downloading songs. e.g. music-dl query --dd E:\Songs 02. renaming : Renaming (flag, 1) When it's 0, the filename of the downloaded songs will not be renamed based on value of tag fields. This flag only works for renaming songs that are being downloaded. 03. renaming-format : Renaming Format (string, |album| - |title|) This parameter represents the format to rename the songs based on tag fields that are being downloaded. e.g. |album|\|title|_|artist|, where text between two pipes (|album|) denotes the tag field. The text inside the pipes will be replaced by the value of the tag field denoted by it and the text outside from the pipes will directly appear in the output filename after renaming. A \ in the renaming format denotes a directory transition. The types of tag fields are unlimited. music-dl can also rename the songs based on any number of tag fields. It has tested support of the below tag fields but you can also have more. Common Tag Fields : title, album, artist, albumartist, year, track, composer, genre, discnumber Extended Tag Fields : barcode, compilation, conductor, contentgroup, copyright, fileowner, initialkey, isrc, language, length, origalbum, origartist, origartist, origfilename, origyear, publisher, source, sourceid, url, wwwartist, wwwaudiofile, wwwaudiosource, wwwcommercialinfo, wwwcopyright, wwwpayment, wwwpublisher, wwwradiopage e.g. music-dl query --renaming --renaming-format |album|_|year|\|title| Note : Renaming may fail for some files when the tag values of tag fields present in renaming format are long in length because there is a limitation in the path length of a file or directory in Windows. 04. json-source : Json source ({********,********,********}, ********) This parameter has only three acceptable values and its default value is ********. e.g. music-dl query --json-source ******** 05. playlists : Playlists (flag, 1) If it's 1, music-dl will download the songs of a playlist to the subfolders of the specified/default download directory. If it's 0, music-dl will download all the songs to the download directory without categorizing them into subfolders based on their playlist name. 06. playlist-name : Playlist Name (string, Not Applicable) You can give playlist names to all the songs being downloaded in the current run. When the query is --last or a file that contains jsonified information of the songs, then this parameter is of no use. I recommend you give the playlist name if you want to categorize the downloaded songs into subfolders of the download directory. You can also give playlist names even if you are not downloading songs by a playlist link. music-dl can also extract playlist names from the playlist link, but the whitespaces in the Original playlist name, will be converted to underscores (_) and the whole name would be lower case converted. It's better to a provide playlist name as a command line argument because the playlist names are also written to the playlist tag field of the songs. The download folder for playlists is also dependent on the playlist name i.e. download-directory\playlists\playlist-name if playlists flag is set as 1. e.g. music-dl query --playlist-name "KK Hits" 07. correct-playlist-name : Correct Playlist Name (flag, 1) If it's 1, the underscores in the playlist name will be replaced with whitespaces and the playlist name will be Upper Case converted. 08. redownload : Redownload (flag, 0) Set it 1 if you want to redownload any song/album link. For redownloading a playlist link, read next flag. 09. redownload-playlist : Redownload Playlist (flag, 0) Set it 1 if you have downloaded a playlist link earlier and want to download it again because you may have added more songs to your playlist. If redownload-playlist is 0, music-dl will just skip that playlist link if it's already downloaded. Note that setting redownload-playlist as 1 will only download the new songs of the playlist. If you want to completely redownload a playlist link whether you have updated the playlist on not, you need to also set redownload as 1. I have made music-dl in such a way that it doesn't download the same song multiple times. 10. scanning-earlier-downloads : Scanning Earlier Downloads (flag, 1) If it's 1, then already downloaded songs will be scanned for not downloading duplicate songs while redownload flag is set as 1. 11. proxy : Proxy (flag, 1) Set it 0 if music-dl is unable to download songs and album covers. Setting it 0 may drastically reduce the download speed for songs/covers. Set proxy as 0 only when ******** does not load/download an album cover or ******** does not play/download a song in a web browser. 12. remove-duplicates : Remove Duplicates ({off,normal,strong}, strong) When it's off, music-dl will download multiple copies of a song. When it's normal or strong, music-dl will try not to download identical songs. When it's normal, music-dl will consider two songs with same links and same playlist names as identical. When it's strong, music-dl will consider two songs with same links as identical. 13. pause-resume : Pause Resume (flag, 1) Pausing and resuming. music-dl can be paused at any time. But it may not get paused immediately when it's doing a download task because the current implementation does not support this. It can be paused when it just completes that downloading task. It can also be paused immediately when it's tagging/renaming. Any combination of keys can be used to pause/resume. 14. prk1 : Pause-Resume key 1 (int or hex code, 0x11) prk1, prk2, prk3, prk4 are integer values of the pause/resume keyboard keys. You can also use the hex values of keyboard keys. See https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes for the hex values of the keyboard keys. By default prk1=0x11, prk2=0x10, and prk3, prk4 are null. 0x11 corresponds to the Ctrl key (Both left and right), 0x10 corresponds to the Shift key (Both left and right). So you can use ctrl+shift to pause/resume music-dl. music-dl may pause a few seconds later when it's not downloading something and when it's downloading you will get a pop-up message that a pause request has been received. If you press again Ctrl+Shift or your own choice of keys, you will again get a pop-up saying that earlier pause request was dismissed and the program will continue to run without pausing. 15. prk2 : Pause-Resume key 2 (int or hex code, 0x10) 16. prk3 : Pause-Resume key 3 (int or hex code, 0) 17. prk4 : Pause-Resume key 4 (int or hex code, 0) e.g. music-dl query --prk1 0x11 --prk2 0x10 --prk3 0x12 18. q : Quiet (flag, 1) - Set as 1 to run music-dl on totally quiet mode. 19. st : Show Title (flag, 1) - Set as 0 to hide the title of music-dl. 20. done-msg : Done Message (flag, 1) - Set it 0, to not print Done/Downloaded message. 21. qjs : Quiet Json Songs (flag, 0) - Set as 1 to download json of songs quietly. 22. qja : Quiet Json Albums (flag, 0) - Set as 1 to download json of albums quietly. 23. qjp : Quiet Json Playlist (flag, 0) - Set as 1 to download json of playlists quietly. 24. qjl : Quiet Json Lyrics (flag, 0) - Set as 1 to download json of lyrics of songs quietly. 25. qd : Quiet Downloading (flag, 0) - Set as 1 to download songs quietly. 26. qc : Quiet Covers (flag, 0) - Set as 1 to download album covers quietly. 27. pb : Progress Bar (flag, 1) You can choose between the progress bar or detailed download information when music-dl is doing a download task. 28. pbjs : Progress Bar Json Songs (flag, 1) - Set as 0 to hide progress bar while Downloading Song Jsons. 29. pbja : Progress Bar Json Albums (flag, 1) - Set as 0 to hide progress bar while Downloading Album Jsons. 30. pbjp : Progress Bar Json Playlists (flag, 1) - Set as 0 to hide progress bar while Downloading Playlist Jsons. 31. pbjl : Progress Bar Json Lyrics (flag, 1) - Set as 0 to hide progress bar while Downloading Lyrics Jsons. 32. pbd : Progress Bar Downloading (flag, 1) - Set as 0 to hide progress bar while Downloading Songs. 33. pbc : Progress Bar Covers (flag, 1) - Set as 0 to hide progress bar while Downloading Album Covers. 34. qtagging : Quiet Tagging (flag, 0) - Set as 1 to hide progress bar while tagging. 35. qscanning : Quiet Scanning (flag, 0) - Set as 1 to hide progress bar while Scanning Earlier Downloaded songs. Note : 1. Quiet flags, progress bar flags, can be combined e.g. If you want to only show tagging then you have to first set all the quiet flags as 1 and then set qtagging as 0. You can achieve the same by just setting q as 1 and qrenaming as 0 which will only show the progress of tagging task. Similar to other show/hide flags. 2. The pbjs, pbja, pbjp, pbjl, pbc, pbd flag will set qjs, qja, qjp, qjl, qc, qd respectively if these pb flags are set as 1. 36. pbcs : Progress Bar Completion String (string, █) You can set any string to denote the completed progress. I will recommend you to use a single character for pbrs and pbcs. 37. pbrs : Progress Bar Remaining String (string, ░) - You can set any string to denote the remaining progress. e.g. music-dl query --pbcs = --pbrs - 38. pb-transition : Progress Bar Transition (string, ->) Separator for showing new filename and old filename in the progress bar in tagging/renaming. e.g. music-dl query --pb-transition music-dl query --pb-transition \\n\\t \\n prints the text to the next line and \\t prints the text after a tab space. 39. progress-delay : Progress Delay (int, 1000) The download speed in the progress bar will be updated after this interval. Set the value in ms to change. e.g. music-dl query --progress-delay 500 music-dl query --progress-delay 2000 40. percentage-gap : Percentage Gap (flag, 1) If it's 1, the percentage in progres bar will get shown as 87 % and when it's 0, the percentage in the progress bar will get shown as 87%. 41. c : clear (flag, 1) - If it's 1, the console will be cleared dynamically when a task gets completed. e.g. music-dl query +c 42. remove-words : Remove Words(flag, 1) Sometimes tags of the album, title or other fields have some common but useless words like (Original Motion Picture Soundtrack), from, - Single, (OST). Set this flag as 0 to keep these annoying words. 43. pause-resume : Pause-Resume (flag, 1) - Pausing/resuming only works when this flag is 1. 44. pb-thread : Progress Bar Thread (flag, 1) - Set it 0, if music-dl is consuming more CPU during directory renaming. 45. cover-retries : Cover Retries (int, 10) - Number of times to retry for downloading album covers. 46. song-retries : Song Retries (int, 5) - Number of times to retry for downloading songs. 47. json-song-retries : Json Song Retries (int, 5) - Number of times to retry for downloading song jsons. 48. json-lyrics-retries : Json Lyrics Retries (int, 5) - Number of times to retry for downloading an album cover. 49. json-album-retries : Json Album Retries (int, 5) - Number of times to retry for downloading album jsons. 50. json-playlist-retries : Json Playlist Retries (int, 5) - Number of times to retry for downloading playlist jsons. 51. json-song-concurrency : Json Song Concurrency (int, 20) - Number of songs to jsonify simultaneously. 52. json-album-concurrecncy : Json Album Concurrency (int, 5) - Number of albums to jsonify simultaneously. 53. json-playlist-concurrecncy : Json Playlist Concurrency (int, 2) - Number of playlists to jsonify simultaneously. 54. json-lyrics-concurrency : Json Lyrics Concurrency (int, 10) - Number of songs to jsonify only lyrics simultaneously. 55. cover-concurrency : Cover Concurrency (int, 20) - Number of album covers to download simultaneously. 56. song-concurrency : Song Concurrency (int, 10) - Number of songs to download simultaneously. 57. json-timeout : Json timeout (int, 600) - Change it to some lower value to reduce waiting time for server to respond while downloading jsons. e.g. music-dl query --song-retries 2 --song-concurrency 20 Parameters for directory renaming : 58. dir-ren-dir-name : Directory Renaming Directory Name (string, NA) This parameter represents the path of a directory for renaming its songs/files. 59. dir-ren-format : Directory Renaming Format (string, Not Applicable) dir-ren-format is nearly similar to renaming-format with few differences. One difference is that renaming-format is used for renaming the songs that are being downloaded and dir-ren-format is used for renaming the files/songs of a directory. Another difference is hat I have defined three other parameters that can be used similarly as tag fields in renaming-format. These are |directory|, |filename|, |extension|= . Note that the extension field is different from others. |directory| will be replaced by the current directory path and |filename| will be replaced by the current filename of the files/songs. You can use |extension|= in dir-ren-format for changing the extension of the files of the directory that you are renaming. Please note that you should use tag fields like |album|, |title| in dir-ren-format for songs/videos only because other files will not have tag fields like album, artist, etc. Other files will only have directory name, filename, extension. e.g. music-dl --dir-ren --dir-ren-dir-name E:\music-dl\downloaded --dir-ren-format "|directory|\|album| - |title| - |year|" Note : 1. You must have to use |directory| in starting in dir-ren-format as shown in the above example to preserve the original directory structure of the directory that you are renaming. Please test it on dummy files for knowing how to use it. 2. For changing the extension, use |extension|=new-extension-without-dot at the last of dir-ren-format 60. qdir-ren : Quiet Directory Renaming (flag, 0) - Set as 1 to hide progress bar while directory renaming. 61. extensions : Extensions (string, mp3 m4a aac flac mp4) You can only rename only files that have extension as mp3/m4a/aac/flac/mp4 of by directory renaming. For renaming files with other extensions, you have to use the extensions flag as shown below. e.g. music-dl --dir-ren --dir-ren-dir-name E:\f1 --extensions "txt exe zip" --renaming-format E:\f2\f3\|filename| music-dl --dir-ren --dir-ren-dir-name E:\mixed --extensions "txt" --renaming-format E:\only_txt_files\|filename| 62. other-files : Other Files (flag, 0) When it's 0, directory renaming will work only on songs that were downloaded by music-dl. If you want to process other files/songs, then this flag must be 1. This flag is for safety. You may also experience reduced performance during directory renaming when this flag is 0. e.g. music-dl --dir-ren --dir-ren-dir-name E:\other_songs --other-files --extensions "mp3" --dir-ren-format E:\mp3_organized\|album|\|track|_|title| ___________________________________________________ Note : 1. If you provide the same argument in the config file and also as command line, then the command line argument will be considered. 2. The order of the parameters doesn't matter neither in the config file nor in command line arguments. 3. Read all about directory renaming and test it on dummy files before using it. A log file will be created always as status|old-filename|new-filename in "sources\logs\dir-ren_logs\" directory. If the status is renamed then the file was renamed/moved successfully. If you accidently renamed the files by a wrong format, then you can check the log files for finding which file was renamed to which new filename. You can restore the original file names from these log files by some other software. 4. See flag number 8, 9 for redownloading the songs.