28 lines
642 B
Bash
Executable File
28 lines
642 B
Bash
Executable File
#!/bin/sh
|
|
|
|
## Download new content from your favorite YouTube channels ##
|
|
# youtube_sync.sh by @root_informatica.
|
|
|
|
# download program path.
|
|
DL="/usr/bin/yt-dlp"
|
|
# downloads history file path.
|
|
HFILE="$HOME/.config/ytdl/ytdl_history"
|
|
# batch file path.
|
|
BFILE="$HOME/.config/ytdl/ytdl_batch"
|
|
# podcast dir path.
|
|
PDIR="$HOME/Descargas/ytdl"
|
|
|
|
# check for proces
|
|
if [ ! "$(pgrep yt-dlp)" ]; then
|
|
|
|
# wait for one minute
|
|
sleep 60;
|
|
|
|
# start yt-dlp
|
|
$DL --download-archive $HFILE -x --audio-format vorbis --audio-quality 0 -i --batch-file=$BFILE --output "$PDIR/%(upload_date)s_%(channel)s_%(duration)s_%(title)s.%(ext)s"
|
|
|
|
fi
|
|
|
|
|
|
|