From 4d0bd914e7c1ee65f4036e60149a7b891906a5d3 Mon Sep 17 00:00:00 2001 From: George Abbott <george@gabbott.dev> Date: Tue, 31 Oct 2023 17:54:07 +0000 Subject: Commit all to date. --- util/music-dl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 util/music-dl (limited to 'util/music-dl') diff --git a/util/music-dl b/util/music-dl new file mode 100755 index 0000000..21d0358 --- /dev/null +++ b/util/music-dl @@ -0,0 +1,14 @@ +#!/bin/sh +# Grab the audio track via yt-dlp, and place in the music folder. + +musicdir="/var/lib/mpd/music/yt-dlp" +record="$musicdir/dlrecord" + +mkdir -p "$musicdir" + +notify-send "Downloading..." "Downloading $1"& +yt-dlp "$1" --format bestaudio -P "$musicdir" -o "%(title)s.%(ext)s" +echo "$1" >> "$record" +notify-send "Song downloaded!" "$1 is now downloaded." & + +mpd update -- cgit v1.2.1