[mythtv-users] Help w/DB error with mythrename since adding .avi's into Recordings

Joe Ripley vitaminjoe at gmail.com
Mon Sep 21 22:06:19 UTC 2009


On Mon, Sep 21, 2009 at 3:23 PM, Bobby Gill <bobbygill at rogers.com> wrote:
> Just sending this out as I asked it in response to another thread but it's
> probably been overlooked, I am getting this error when running mythrename.pl
> since I added some .avi's into Recordings. I had forgotten to use the ChanID
> on a few first additions (done properly on all additions since), so how can
> I go and fix this?
>
>>
>> DBD::mysql::st execute failed: Column 'starttime' cannot be null at
>> /usr/share/perl5/site_perl/5.10.0/MythTV/Recording.pm line 69.
>>>
>>> DBD::mysql::st fetchrow_array failed: fetch() without execute() at
>>> /usr/share/perl5/site_perl/5.10.0/MythTV/Recording.pm line 70.
>>
>> The problem is exactly what it says it is.  You manually added files to
>> the recordings improperly (without proper chanid and starttime).  MythTV
>> uses those two values to index recorded content, and so if those are not
>> available and distinct, bad things will happen.
>> _______________________________________________
>
>> Ah yes, I see what I have done wrong now when having added them. I got the
>> ChanID list going properly and added a few correctly, but now how do I go
>> and change the channel ID for all these ones I've added before?

The only way to fix this is to edit the database directly.  Make sure
you run a backup of the DB before touching it.

To find the records that you need to fix, do something like this:

$  mysql -u mythtv -pmythtv mythconverg
mysql> select * from recorded where starttime IS NULL;

The 'starttime' field is a datetime with a format of  YYYY-MM-DD
HH:MM:SS.  More here: http://www.mythtv.org/wiki/Recorded

You'll need to populate these fields with relavant data, as well as
any other NULL field that should not be NULL.

(Did I mention to do a backup before doing stuff like this?)

-- 
Joe Ripley
vitaminjoe at gmail.com


More information about the mythtv-users mailing list