From cf1190e78d70a39a05bb7d27075f2228b566af8a Mon Sep 17 00:00:00 2001 From: Riyyi Date: Wed, 2 Mar 2022 12:17:30 +0100 Subject: [PATCH] Scripts: Add metadata to downloaded videos --- .local/bin/aliases | 2 ++ .local/bin/dl | 1 + 2 files changed, 3 insertions(+) diff --git a/.local/bin/aliases b/.local/bin/aliases index 99d6e0e..1c7db94 100755 --- a/.local/bin/aliases +++ b/.local/bin/aliases @@ -106,6 +106,8 @@ stream() { if [ -z "$quality" ]; then streamlink --quiet --config "/dev/null" "https://twitch.tv/$1" + [ "$?" -ne 0 ] && return 1 + printf "Select stream quality: " read -r quality fi diff --git a/.local/bin/dl b/.local/bin/dl index 9aa6862..fda095c 100755 --- a/.local/bin/dl +++ b/.local/bin/dl @@ -112,6 +112,7 @@ downloadVideo() [ -z "$videoBest" ] && videoLimit="[height<=?1080]" youtube-dl --format "bestvideo${videoLimit}+bestaudio/best" \ + --add-metadata \ --external-downloader aria2c \ --cookies "$HOME/documents/youtube.com-cookies.txt" "$1" }