From 47886f3b9c143814eb3427ad30490e692040a83d Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Mon, 23 Oct 2023 08:52:57 +0200 Subject: [PATCH] =?UTF-8?q?auto=5Fraspi.sh:=20A=C3=B1adida=20opcion=20para?= =?UTF-8?q?=20mostrar=20videos=20en=20pantalla=20completa,=20en=20bucle=20?= =?UTF-8?q?y=20aleatoriamente=20de=20una=20lista?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_raspi.sh | 16 ++++++++++++++-- eom.sh | 13 ------------- 2 files changed, 14 insertions(+), 15 deletions(-) delete mode 100755 eom.sh diff --git a/auto_raspi.sh b/auto_raspi.sh index c9677f4..bd6f46c 100755 --- a/auto_raspi.sh +++ b/auto_raspi.sh @@ -2,7 +2,6 @@ # Script para ejecutar un slideshow con eom # de una carpeta al azar dentro de un directorio - if [[ $1 == 1 ]] then FOLDER=/home/sergio/zx/scr_packs @@ -12,12 +11,25 @@ then feh "${SUBFOLDERS[$NUM]}" -z -D 60 -F -Y fi + # Script para montar un tunel ssh hasta una camara # y mostrar el stream de video con el vlc - if [[ $1 == 2 ]] then sleep 20 ssh -f -o ExitOnForwardFailure=yes cam sleep 30 vlc -f rtsp://admin:ImouCr1st1n4@127.0.0.1:3501 fi + + +# Script para mostrar un video al azar de una carpeta +# en modo pantalla completa y en bucle +if [[ $1 == 3 ]] +then + FOLDER=/home/sergio/VĂ­deos/zx_spectrum + VIDEOS=("${FOLDER}"/*) + NUM=$(( RANDOM % ${#VIDEOS[@]})) + ls -d $FOLDER > /tmp/auto_raspi.m3u + #vlc "${VIDEOS[$NUM]}" --fullscreen --loop --no-osd --mouse-hide-timeout=1 --no-mouse-events + vlc /tmp/auto_raspi.m3u --random --fullscreen --loop --no-osd --mouse-hide-timeout=1 --no-mouse-events +fi diff --git a/eom.sh b/eom.sh deleted file mode 100755 index 9b02659..0000000 --- a/eom.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -# Script para ejecutar un slideshow con eom -# de una carpeta al azar dentro de un directorio - -FOLDER=/home/sergio/zx/scr_packs - -array=("${FOLDER}"/*/) -#for dir in "${array[@]}"; do echo "$dir"; done -NUM=$(( RANDOM % ${#array[@]})) -#echo "${array[$NUM]}" - -eom -f -s "${array[$NUM]}" \ No newline at end of file