Added ytdl-music.sh
This commit is contained in:
parent
8af3f8372e
commit
cccd548ee1
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
PLAYLISTURL="$1"
|
||||||
|
DEFAULT_TARGET_PATH="/mnt/data/media/"
|
||||||
|
LIBRARY_NAME="${2:-Soundtracks}"
|
||||||
|
TARGETPATH="${3:-$DEFAULT_TARGET_PATH}"
|
||||||
|
|
||||||
|
# Check if $PLAYLISTURL is empty
|
||||||
|
if [ -z "$PLAYLISTURL" ]; then
|
||||||
|
echo "Need to specify a playlist URL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use double quotes for variables within the yt-dlp command
|
||||||
|
yt-dlp -f 'ba' -x --audio-format mp3 "$PLAYLISTURL" -o "$TARGETPATH/$LIBRARY_NAME/%(playlist)s/%(title)s.%(ext)s"
|
Loading…
Reference in New Issue