screen capture error was stopping import

This commit is contained in:
fred 2022-06-14 04:45:46 +02:00
parent c4d8eefd2b
commit a67fb6486c
1 changed files with 7 additions and 5 deletions

View File

@ -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