From a667e4eb3155956393b357ff8fc3d209f4f5730b Mon Sep 17 00:00:00 2001 From: Sven Klomp Date: Tue, 16 Nov 2021 21:32:10 +0100 Subject: [PATCH] Fix broken video playback Fixes #56 --- board/common/overlay/etc/version | 2 +- package/photoframe/photoframe.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/board/common/overlay/etc/version b/board/common/overlay/etc/version index d5d7c24149..7c6d418de5 100644 --- a/board/common/overlay/etc/version +++ b/board/common/overlay/etc/version @@ -1,4 +1,4 @@ OS_NAME="photOS" OS_SHORT_NAME="photOS" OS_PREFIX="photos" -OS_VERSION="0.3.6-rc4" +OS_VERSION="0.3.6-rc5" diff --git a/package/photoframe/photoframe.sh b/package/photoframe/photoframe.sh index 4a406c0429..cf3e2dd834 100755 --- a/package/photoframe/photoframe.sh +++ b/package/photoframe/photoframe.sh @@ -242,8 +242,9 @@ function start { get_image fi else - # video has ended - if ! kill $PID > /dev/null 2>&1; then + # Check if video has ended + if ! [ -d "/proc/$PID" ]; then + # Video has ended, new media can be shown UPDATE_MEDIA=true get_image fi @@ -267,7 +268,7 @@ function start { LAST_IMAGE_UPDATE=$(date +%s) fbv $PARAMS_FBV "$IMAGE" else - omxplayer "$IMAGE" & + omxplayer --no-keys "$IMAGE" & PID=$! fi