Bug #509
Thumbnail Generator (screenshooter.sh) exits when more than one directory defined for MythVideo
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | 12/31/1969 | |
Assignee: | cecil | % Done: | 0% |
|
Category: | - | Spent time: | - | |
Target version: | 7.3 |
Description
The script that is called by the Thumbnail generator named /usr/LH/bin/screenshooter.sh will exit when more than one directory path is defined in MythVideo. In MythVideo more than one directory can be defined by colon ":" separating each path. The screenshooter.sh script assumes there is just one path.
Here is a proposed solution (diff):
90,94c90,99
< if [ ! d "$VIDEO_HOME" ] ; then
< echo "Directory $VIDEO_HOME does not exist, nowhere to put the screen shot!"
< echo "Have you configured MythVideo yet?"
< exit 1
< fi
--
VIDEO_HOME=(${VIDEO_HOME//:/ });
VIDEO_HOME_COUNT=${#VIDEO_HOME[@]}
for (( i=0; i<${VIDEO_HOME_COUNT}; i++ ));
do
if [ ! -d "${VIDEO_HOME[${i}]}" ] ; then
echo "Directory ${VIDEO_HOME[${i}]} does not exist, nowhere to put the screen shot!"
echo "Have you configured MythVideo yet?"
exit 1
fi
done
Attached is a file reflecting this change.