RPiVideoLooper icon indicating copy to clipboard operation
RPiVideoLooper copied to clipboard

Videolooper starting too fast before wifi network

Open darkvador72 opened this issue 8 years ago • 1 comments

Hi,

When using Video looper to connect to a SMB share (on Windows) using wifi connection, the application Video Looper is starting before SMB mount completion.

Is there a way to check that there are files in the target directory and wait before starting the app or to restart the app using a cron entry ?

Thank you for yoru help Best Regards

darkvador72 avatar Mar 14 '16 15:03 darkvador72

I scripted an rsync to copy the files off the SMB share and onto the SD card nightly. So they would easily be available.

Don't have time to test this right now, but in startvideos.sh you could try adding something like this after line 14:

# Set bailout to avoid an infinite loop if the FILES share never is readable.
bailout=0
while [! -r $FILES && -x $FILES  ];
do
    sleep 2
    bailout+=2
    if [[ ! "$bailout" -gt 200 ]]; then
        exit 0
done

The idea is to test the FILES directory is readable and executable then sleep 2 seconds and try again. And exit if it hits 200 seconds.

rmcaninch avatar Dec 24 '16 03:12 rmcaninch