Exit grabtitle, if nothing was read. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 57726e0f7ff167940380738fe63f552184355bd2 | |
parent d6dfa7226b2784fcfda280592216f3d2f0b903f5 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sun, 19 Apr 2020 22:20:24 +0200 | |
Exit grabtitle, if nothing was read. | |
Diffstat: | |
M subtitle-paste | 2 ++ | |
1 file changed, 2 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/subtitle-paste b/subtitle-paste | |
@@ -16,6 +16,8 @@ tmpfile="$(mktemp -u p-XXXXXXXXXXXXX)" | |
youtube-dl -q --write-sub --skip-download -o "${tmpfile}" "${url}" | |
ofile="$(basename $(find . -name "${tmpfile}.*"))" | |
+[ -z "${ofile}" ] && exit 1 | |
+ | |
if [ $(stat -c%s "${ofile}") -eq 0 ]; | |
then | |
rm "${ofile}" |