diff --git a/ajouter_video.sh b/ajouter_video.sh index a08a316..56cc3b7 100755 --- a/ajouter_video.sh +++ b/ajouter_video.sh @@ -433,18 +433,20 @@ GENRES="[\"$(echo ${FILM_GENRES} | sed s/\|/\",\"/g)\"]" ######################################################################## # Screen capture is used as thumbnail ######################################################################## -zenity --warning --width 300 --text "Cliquez nous capturons votre écran comme vignette MEDIA" -sleep 1 -[[ $(echo $DISPLAY | cut -d ':' -f 1) == "" ]] && import -window root /tmp/screen.png - +if [[ $(echo $DISPLAY | cut -d ':' -f 1) == "" ]]; then + zenity --warning --width 300 --text "Cliquez nous capturons votre écran comme vignette MEDIA" + sleep 1 + import -window root /tmp/screen.png +fi ################################### ### MOVING FILE TO ~/astroport #### ################################### mkdir -p ~/astroport/${CAT}/${MEDIAID}/ -mv -f "${FILE_PATH}/${FILE_NAME}" "$HOME/astroport/${CAT}/${MEDIAID}/${TITLE}.${FILE_EXT}" mv /tmp/screen.png ~/astroport/${CAT}/${MEDIAID}/screen.png +mv -f "${FILE_PATH}/${FILE_NAME}" "$HOME/astroport/${CAT}/${MEDIAID}/${TITLE}.${FILE_EXT}" + if [ $? == 0 ]; then zenity --warning --width ${large} --text "Votre fichier ~/astroport/${CAT}/${MEDIAID}/${TITLE}.${FILE_EXT} est prêt à embarquer. Cliquez sur OK, nous allons préparer son script d'ajout à Astroport..." else