summaryrefslogtreecommitdiffstats
path: root/files/.bin/download_music.sh
diff options
context:
space:
mode:
Diffstat (limited to 'files/.bin/download_music.sh')
-rwxr-xr-xfiles/.bin/download_music.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/files/.bin/download_music.sh b/files/.bin/download_music.sh
new file mode 100755
index 0000000..e3a3601
--- /dev/null
+++ b/files/.bin/download_music.sh
@@ -0,0 +1,26 @@
1#!/bin/sh
2
3BOLD="\e[1";
4ENDCOLOR="\e[0m";
5Green="32";
6LightRed="31";
7
8if ! [ $1 ]; then
9 echo ""
10 echo -e $BOLD";"";"$LightRed"m Please provide music url!"$ENDCOLOR
11 echo ""
12 exit
13fi
14
15MUSIC_DIR="~/Documents/Music/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s"
16if [ $2 ]; then
17 MUSIC_DIR="${a}/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s"
18fi
19
20echo ""
21echo -e $BOLD";"";"$Green"m Music will download to ${MUSIC_DIR} directory!"$ENDCOLOR
22echo ""
23
24sleep 1
25
26yt-dlp -x --audio-format mp3 --embed-metadata -o $MUSIC_DIR $1