#!/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