From edcd842ac3cfabe17dae1e311774d6cdbb483d81 Mon Sep 17 00:00:00 2001 From: Tobias Perschon Date: Sat, 24 Aug 2019 11:29:37 +0200 Subject: [PATCH] v1.0.2 --- README.md | 11 +++++++++++ video_looper.conf => assets/video_looper.conf | 0 video_looper.ini => assets/video_looper.ini | 9 +++++---- enable.sh | 11 +++++++++++ install.sh | 12 ++++++++++-- setup.py | 2 +- 6 files changed, 38 insertions(+), 7 deletions(-) rename video_looper.conf => assets/video_looper.conf (100%) rename video_looper.ini => assets/video_looper.ini (96%) create mode 100644 enable.sh diff --git a/README.md b/README.md index 8c5c8a6..5da6af3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,18 @@ Easy to use out of the box but also has a lot of settings to make it fit your us If you miss a feature just post an issue on github. (https://github.com/adafruit/pi_video_looper) +##Changelog +#### new in v1.0.2: + - in directory mode the directory is now monitored; + if the number of files have changed the playlist is regenerated + - some defaults have changed + - new option for the countdown time (default is now 5 seconds) + - new option for a wait time between videos (default is 0 seconds) + - tweaks to the install script (skip the build of hello_video by using (sudo ./install.sh no_hello_video)) + - cleanup of the directory structure + - added enable.sh analogous to disable.sh + #### new in v1.0.1: - reworked for python3 - keyboard control (quiting the player) diff --git a/video_looper.conf b/assets/video_looper.conf similarity index 100% rename from video_looper.conf rename to assets/video_looper.conf diff --git a/video_looper.ini b/assets/video_looper.ini similarity index 96% rename from video_looper.ini rename to assets/video_looper.ini index 2dd1460..12c9ae9 100644 --- a/video_looper.ini +++ b/assets/video_looper.ini @@ -34,7 +34,7 @@ osd = true #osd = false #Below you can set for how many secounds the osd (and countdown) is displayed after files are found -countdown_time = 10 +countdown_time = 5 # Below you can set a timout time (in seconds) that is waited between each video wait_time = 0 @@ -64,14 +64,15 @@ bgcolor = 0, 0, 0 fgcolor = 255, 255, 255 # Output program state to standard output if true. -console_output = true -#console_output = false +# Useful for debugging to see whats going on behind the scenes +console_output = false +#console_output = true # Directory file reader configuration follows. [directory] # The path to search for movies when using the directory file reader. -path = /home/pi +path = /home/pi/video # USB drive file reader configuration follows. [usb_drive] diff --git a/enable.sh b/enable.sh new file mode 100644 index 0000000..c19396a --- /dev/null +++ b/enable.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Make sure script is run as root. +if [ "$(id -u)" != "0" ]; then + echo "Must be run as root with sudo! Try: sudo ./enable.sh" + exit 1 +fi + +# Disable any supervisor process that start video looper. +mv /etc/supervisor/conf.d/video_looper.conf.disabled /etc/supervisor/conf.d/video_looper.conf +supervisorctl start video_looper \ No newline at end of file diff --git a/install.sh b/install.sh index 5c30ba1..a1b8928 100755 --- a/install.sh +++ b/install.sh @@ -33,15 +33,23 @@ fi echo "Installing video_looper program..." echo "==================================" + +# change the directoy to the script location cd "$(dirname "$0")" + mkdir -p /mnt/usbdrive0 # This is very important if you put your system in readonly after +mkdir -p /home/pi/video # create default video directory + pip3 install setuptools python3 setup.py install --force -cp video_looper.ini /boot/video_looper.ini + +cp ./assets/video_looper.ini /boot/video_looper.ini echo "Configuring video_looper to run on start..." echo "===========================================" -cp video_looper.conf /etc/supervisor/conf.d/ + +cp ./assets/video_looper.conf /etc/supervisor/conf.d/ + service supervisor restart echo "Finished!" diff --git a/setup.py b/setup.py index daf4270..6e59bcd 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name = 'Adafruit_Video_Looper', - version = '1.0.1', + version = '1.0.2', author = 'Tony DiCola', author_email = 'tdicola@adafruit.com', description = 'Application to turn your Raspberry Pi into a dedicated looping video playback device, good for art installations, information displays, or just playing cat videos all day.',