Commit 80efdc7f authored by Ruben Schade's avatar Ruben Schade
Browse files

Delete original thumbnail when done

parent faed3f00
......@@ -6,12 +6,13 @@
## Download video thumbnail
VIDEO=`youtube-dl --get-thumb --no-warnings $1 | tail -1`
curl -Lo "video.jpg" "$VIDEO"
curl -Lo "$THUMB" "$VIDEO"
## Get video title
TITLE=`youtube-dl --get-title --no-warnings $1 | tail -1`
......@@ -35,5 +36,5 @@ convert -resize 500x281 "video.jpg" -quality 97 "yt-$ID@1x.jpg" \
+page "$PLAY1X" -flatten "yt-$ID@1x.jpg"
## Upload files and delete on success
scp yt-$ID@*jpg $SERVER:$YEAR/ && rm -rf yt-$ID@*jpg
scp yt-$ID@*jpg $SERVER:$YEAR/ && rm -rf yt-$ID@*jpg && rm -rf "$THUMB"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment