#!/usr/bin/env bash # Download files using yt-dlp -x # Usage: dlm.sh [URL1 ... URLn] # Dependencies: yt-dlp # Check if yt-dlp is installed if ! command -v yt-dlp &> /dev/null; then echo "yt-dlp is not installed" exit 1 fi # Check if URLs are provided if [ "$#" -eq 0 ]; then echo "No URLs provided" exit 1 fi # Download files using yt-dlp -x and save them without the youtube id yt-dlp -x --audio-format mp3 --output "%(title)s.%(ext)s" "$@" # Change the file's owner to 568:568 # Change the file's permissions to 770 sudo chown 568:568 ./*.mp3 sudo chmod 770 ./*.mp3