From 74f7aa38bc55b1e61e78e80045b525a336a39dbe Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Tue, 7 Nov 2023 02:23:24 +0100 Subject: [PATCH] Refactoring --- arbit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arbit b/arbit index 4589560..9988cca 100755 --- a/arbit +++ b/arbit @@ -37,8 +37,8 @@ clipboardQuery(){ } 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" + 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(){ @@ -68,7 +68,7 @@ viewUrl(){ download(){ url="$(echo "$*" | sed 's/download //')" notify-send "Arbit" "Downloading video to ${downloadDir}" - if yt-dlp -o "${downloadDir}/%(title)s - %(uploader)s.%(ext)s" "${url}" + if downloadCommand "${url}" then notify-send "Arbit" "Finished downloading video." else die "Failed to download file" fi