[mythtv-users] Quick script question

Nick Morrott knowledgejunkie at gmail.com
Wed Aug 15 14:47:26 UTC 2007


On 15/08/07, Sarah Katherine Hayes <aleph.wintermute at ntlworld.com> wrote:
> I'm overhauling the screenshooter.sh script I found on the Mythic
> website, just so it's multiple front-end aware and can be run from
> either FE or BE without issues.   Just for giggles if it hits a file
> that meets the criteria (is a valid video file, but does not exist in
> the database) it'll do a quick import and continue generating the
> screenshot.
>
> Does this look right:
>
> mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME
> mythconverg -sNBe "insert into `videometa` (`title`, `director`, `plot`,
> `rating`, `inetref`, `year`, `userrating`, `length`, `showlevel`,
> `filename`, `coverfile`,
> ('$VIDEO_FILENAME','Unknown','Unknown','0','0000000','1895','0','0','$VIDEO_PATHNAME','No
> Cover');"
>
>
> Assuming the variables are all filled correctly?

Your "insert into" clause lists 11 fields to insert into but you have
only provided 10 pieces of data. `length` or `showlevel` seems to be
missing.

I would also rename the variable used with the 'mysql -h' option to
$MYSQL_HOSTNAME as the MySQL server _can_ be located on a different
machine to the master backend (although typically it isn't).

-- 
Nick

MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin


More information about the mythtv-users mailing list