This commit is contained in:
Nox Sluijtman 2023-11-07 02:17:26 +01:00
parent e6854ffe35
commit 85d60470a7

7
arbit
View file

@ -36,10 +36,15 @@ clipboardQuery(){
pipe-viewer --player=mpv "${clipboardContent}"
}
downloadCommand(){
#yt-dlp --embed-chapters --embed-metadata --embed-subs -o "${downloadDir}/%(title)s - %(uploader)s.%(ext)s" "$1"
yt-dlp -o "${downloadDir}/%(title)s - %(uploader)s.%(ext)s" "$1"
}
downloadClipUrl(){
getClip
notify-send "Arbit" "Downloading video to ${downloadDir}"
if yt-dlp --embed-chapters --embed-metadata --embed-subs -o "${downloadDir}/%(title)s - %(uploader)s.%(ext)s" "${clipboardContent}"
if downloadCommand "${clipboardContent}"
then notify-send "Arbit" "Finished downloading video."
else die "Failed to download file"
fi