From e999e8b6581bb07c78883699e11f01313d8cda69 Mon Sep 17 00:00:00 2001 From: Gabriel Carneiro Date: Mon, 5 Aug 2024 22:36:03 -0300 Subject: [PATCH] add missing thumbs, fix script thumb path --- _data/aulas.json | 2 +- pages/aulas.html | 2 +- php/upload.php | 26 +++----------------------- script/script.sh | 6 ++++-- 4 files changed, 9 insertions(+), 27 deletions(-) diff --git a/_data/aulas.json b/_data/aulas.json index cebec79..cbf86bc 100644 --- a/_data/aulas.json +++ b/_data/aulas.json @@ -9,7 +9,7 @@ "level": "Basico" }, { - "title": "Introdução ao MIxxx", + "title": "Introdução ao Mixxx", "user": "fls", "author": "Flávio Luiz Schiavoni", "description": "Bem-vindos ao curso de Mixxx, um software de DJ gratuito e de código aberto que permite que você crie sets incríveis e faça mixagens profissionais. Este curso é ideal para quem deseja começar na arte da discotecagem ou para DJs experientes que querem explorar uma nova ferramenta.", diff --git a/pages/aulas.html b/pages/aulas.html index 5fe3a0c..15901dc 100755 --- a/pages/aulas.html +++ b/pages/aulas.html @@ -16,7 +16,7 @@ lang: pt
- +
diff --git a/php/upload.php b/php/upload.php index 052e437..57f4de2 100755 --- a/php/upload.php +++ b/php/upload.php @@ -1,24 +1,11 @@ diff --git a/script/script.sh b/script/script.sh index 170148f..5278a13 100755 --- a/script/script.sh +++ b/script/script.sh @@ -20,6 +20,8 @@ process_video () { OUTPUT="$ASSETS/videos/${NAME}.mp4" fi + THUMB_PATH=$(dirname $OUTPUT)/${NAME} + echo "########################################" echo "# Aula: ${AULA}" echo "# Author: ${AUTHOR}" @@ -34,8 +36,8 @@ process_video () { # #################################### # Creating the thumbnail if does not exist # #################################### - if test ! -f "$ASSETS/thumbs/${NAME}.jpg" ; then - ffmpeg -y -i "${INPUT}" -vframes 1 -an -s 400x222 -ss 30 "$ASSETS/thumbs/${NAME}.jpg" + if test ! -f "${THUMB_PATH}.jpg" ; then + ffmpeg -y -i "${INPUT}" -vframes 1 -an -s 400x222 -ss 30 "${THUMB_PATH}.jpg" fi # ####################################