http://linhes.org/2009-08-16T11:29:57+00:00 LinHES - Bug #509: Thumbnail Generator (screenshooter.sh) exits when more than one directory defined for MythVideohttp://linhes.org/issues/509?journal_id=87882009-08-16T11:29:57+00:00djb61230douglas.barnum@gmail.com
<ul><li><strong>Subproject of</strong> deleted (<strike></strike>)</li><li><strong>Due date</strong> set to <i>12/31/1969</i></li><li><strong>Estimated time</strong> deleted (<strike></strike>)</li><li><strong>Start date</strong> deleted (<strike></strike>)</li><li><strong>Tracker</strong> set to <i>Bug</i></li><li><strong>Assignee</strong> set to <i>cecil</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>0</i></li><li><strong>Category</strong> deleted (<strike></strike>)</li><li><strong>Description</strong> set to <i>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.</i></li><li><strong>Project</strong> set to <i> LinHES</i></li><li><strong>Subject</strong> set to <i>Thumbnail Generator (screenshooter.sh) exits when more than one directory defined for MythVideo</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Normal</i></li><li><strong>Target version</strong> set to <i>7.3</i></li></ul>