<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jun 28, 2014 at 11:20 PM, Daniel Frey <span dir="ltr"><<a href="mailto:dmfrey@gmail.com" target="_blank">dmfrey@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><p dir="ltr"><br>
On Jun 28, 2014 1:43 PM, "R.D. Vaughan" <<a href="mailto:rdvandroid@gmail.com" target="_blank">rdvandroid@gmail.com</a>> wrote:<br>
><br>
> Daniel, <br>
> Sorry for not answering earlier but I'm taking care of some family business and will not be near my development machine for at least another week. <br>
><br>
> As the python code snippet you tried still has an error you may want to tap Raymond Wagner's experience as he's the python binding's author. At this point MiroBridge is not part of the equation. It is likely a issue between your database and the bindings. <br>
><br>
> Or you could wait until I'm back but as I wrote that will be awhile. <br>
><br>
> Doug <br>
><br>
> On June 27, 2014 4:05:29 PM EDT, Daniel Frey <<a href="mailto:dmfrey@gmail.com" target="_blank">dmfrey@gmail.com</a>> wrote:<br>
>><br>
>> Doug,<br>
>><br>
>> I sent this the other day, but it looks like the mailing list didn't like the size of the dataheap.py I attached. Here is the message, but now I copied the file to pastebin.<br>
>><br>
>> I compared the data on miro with the names in the db, they are the same. I dumped the db just to verify there weren't any errant spaces or characters in there and there are none.<br>
>><br>
>> I tried stepping through the code you posted to me here and it appears the Record is uninitialized at the point at which it tries write the record to the database. Doesn't make sense since I can see that that object is populated. <br>
>><br>
>> Can you try stepping through with Python PuDB and see what happens on your end?<br>
>><br>
>> Can you diff /usr/lib/python2.7/dist-packages/MythTV/dataheap.py on your machine with the one on mine? Please see the pastebin link below. This is where it is failing.<br>
>><br>
>> Thanks again for your help.<br>
>><br>
>> Dan<br>
>><br>
>> <a href="http://pastebin.com/RKTL18rm" target="_blank">http://pastebin.com/RKTL18rm</a><br>
>><br>
>><br>
>> On Tue, Jun 17, 2014 at 3:43 PM, Daniel Frey <<a href="mailto:dmfrey@gmail.com" target="_blank">dmfrey@gmail.com</a>> wrote:<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> On Fri, Jun 13, 2014 at 3:49 PM, Daniel Frey <<a href="mailto:dmfrey@gmail.com" target="_blank">dmfrey@gmail.com</a>> wrote:<br>
>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> On Fri, Jun 13, 2014 at 1:43 PM, R.D. Vaughan <<a href="mailto:rdvandroid@gmail.com" target="_blank">rdvandroid@gmail.com</a>> wrote:<br>
>>>>><br>
>>>>> Daniel,<br>
>>>>> Here is something to try. As your DB knowledgeable you can find a "Record" record from another Miro channel and copy that record but change the title and inetref number to match the Miro channel for the video that was downloaded. I think it was Tekzilla. The title must be an exact match to what you call it on Miro. Look up that channel title on <a href="http://thetvdb.org" target="_blank">thetvdb.org</a> web site to get the Internet number (see end of url) . Then add the new record, this will avoid MiroBridge adding the record itself. <br>
>>>>><br>
>>>>> Obviously this is not a solution but may get you going. To me the last test you did with the cut and paste code showed that this is not a MiroBridge issue. <br>
>>>>><br>
>>>>> I've run out of ideas. <br>
>>>>><br>
>>>>> Doug <br>
>>>>><br>
>>>>> On June 11, 2014 10:57:35 PM EDT, Daniel Frey <<a href="mailto:dmfrey@gmail.com" target="_blank">dmfrey@gmail.com</a>> wrote:<br>
>>>>>><br>
>>>>>><br>
>>>>>> On Jun 11, 2014 9:40 PM, "<a href="mailto:rdvAndroid@gmail.com" target="_blank">rdvAndroid@gmail.com</a>" <<a href="mailto:rdvandroid@gmail.com" target="_blank">rdvandroid@gmail.com</a>> wrote:<br>
>>>>>> ><br>
>>>>>> > Daniel,<br>
>>>>>> ><br>
>>>>>> > Cut and paste the following lines in a terminal session on the BE thatyou run Mirobridge:<br>
>>>>>> > ----------------------------- Cut code starting on next line<br>
>>>>>> > python<br>
>>>>>> > from MythTV import Record<br>
>>>>>> > makeRecordRule = {'chanid': "9999", 'description': u'Mirobridge Record rule used to acquire <a href="http://ttvdb.com" target="_blank">ttvdb.com</a> artwork',<br>
>>>>>> > 'autometadata': 1, 'season': 1, 'episode': 1, 'category': u'Miro', 'station': u'Miro' }<br>
>>>>>> > makeRecordRule['title'] = "Tekzilla"<br>
>>>>>> > makeRecordRule['inetref'] = "999999"<br>
>>>>>> > record = Record().create(makeRecordRule)<br>
>>>>>> > print record<br>
>>>>>> > record.delete()<br>
>>>>>> > exit(0)<br>
>>>>>> > ---------------------------- Stop cutting code prior to this line<br>
>>>>>> ><br>
>>>>>> > My results with an environment that has a working MiroBridge looks like this:<br>
>>>>>> > doug@ubuntuQuad:~$ python<br>
>>>>>> > Python 2.7.3 (default, Feb 27 2014, 19:37:34)<br>
>>>>>> > [GCC 4.7.2] on linux2<br>
>>>>>> > Type "help", "copyright", "credits" or "license" for more information.<br>
>>>>>> > >>> from MythTV import Record<br>
>>>>>> > >>> makeRecordRule = {'chanid': "9999", 'description': u'Mirobridge Record rule used to acquire <a href="http://ttvdb.com" target="_blank">ttvdb.com</a> artwork',<br>
>>>>>> > ... 'autometadata': 1, 'season': 1, 'episode': 1, 'category': u'Miro', 'station': u'Miro' }<br>
>>>>>> > >>> makeRecordRule['title'] = "Tekzilla"<br>
>>>>>> > >>> makeRecordRule['inetref'] = "999999"<br>
>>>>>> > >>> record = Record().create(makeRecordRule)<br>
>>>>>> > >>> print record<br>
>>>>>> > <Record Rule 'Tekzilla', Type 11 at 0x10e42c0><br>
>>>>>> > >>> record.delete()<br>
>>>>>> > >>> exit(0)<br>
>>>>>> > doug@ubuntuQuad:~$<br>
>>>>>> ><br>
>>>>>> > If your environment aborts then the issue is in your environement. The code above is the standard way to create a "Record" record using the MythTV python bindings. If the record is created then it is immediately deleted so you will not need to clean up your database after running the test. You can run this test as many times as you like as long as you include the "record.delete()" statement.<br>
>>>>>> ><br>
>>>>>> > Please paste back the results of your test.<br>
>>>>>> ><br>
>>>>>> > Thanks<br>
>>>>>> ><br>
>>>>>> ><br>
>>>>>> > Doug<br>
>>>>>> > _______________________________________________<br>
>>>>>> > mythtv-users mailing list<br>
>>>>>> > <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
>>>>>> > <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
>>>>>> > <a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
>>>>>> > MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a><br>
>>>>>><br>
>>>>>> Doug,<br>
>>>>>> Thanks for your help. Here is the output I received. It did error out.<br>
>>>>>><br>
>>>>>> dmfrey@mythcenter:~$ python<br>
>>>>>> Python 2.7.3 (default, Feb 27 2014, 19:58:35)<br>
>>>>>> [GCC 4.6.3] on linux2<br>
>>>>>> Type "help", "copyright", "credits" or "license" for more information.<br>
>>>>>> >>> from MythTV import Record<br>
>>>>>> >>> makeRecordRule = {'chanid': "9999", 'description': u'Mirobridge Record rule used to acquire <a href="http://ttvdb.com" target="_blank">ttvdb.com</a> artwork',<br>
>>>>>> ... 'autometadata': 1, 'season': 1, 'episode': 1, 'category': u'Miro', 'station': u'Miro' }<br>
>>>>>> >>> makeRecordRule['title'] = "Tekzilla"<br>
>>>>>> >>> makeRecordRule['inetref'] = "999999"<br>
>>>>>> >>> record = Record().create(makeRecordRule)<br>
>>>>>> Traceback (most recent call last):<br>
>>>>>> File "<stdin>", line 1, in <module><br>
>>>>>> File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line 161, in __init__<br>
>>>>>> DBDataWrite.__init__(self, data, db)<br>
>>>>>> File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line 317, in __init__<br>
>>>>>> DBData.__init__(self, data, db)<br>
>>>>>> File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line 169, in __init__<br>
>>>>>> self._setDefs()<br>
>>>>>> File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line 305, in _setDefs<br>
>>>>>> DBData._setDefs(self)<br>
>>>>>> File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line 160, in _setDefs<br>
>>>>>> self.__class__._setClassDefs(self._db)<br>
>>>>>> File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line 118, in _setClassDefs<br>
>>>>>> defaults = cls._template('Default', db=db)<br>
>>>>>> File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line 128, in _template<br>
>>>>>> tmp = cls._fromQuery("WHERE title=?", (name + " (Template)",))\<br>
>>>>>> StopIteration<br>
>>>>>> >>> print record<br>
>>>>>> Traceback (most recent call last):<br>
>>>>>> File "<stdin>", line 1, in <module><br>
>>>>>> NameError: name 'record' is not defined<br>
>>>>>> >>> record.delete()<br>
>>>>>> Traceback (most recent call last):<br>
>>>>>> File "<stdin>", line 1, in <module><br>
>>>>>> NameError: name 'record' is not defined<br>
>>>>>> >>> exit(0)<br>
>>>>>><br>
>>>>>> Dan<br>
>>>>>><br>
>>>>>> ________________________________<br>
>>>>>><br>
>>>>>> mythtv-users mailing list<br>
>>>>>> <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
>>>>>> <a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a><br>
>>>>><br>
>>>>><br>
>>>>> -- <br>
>>>>> Sent from my Android device with K-9 Mail. Please excuse my brevity.<br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> mythtv-users mailing list<br>
>>>>> <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
>>>>> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
>>>>> <a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
>>>>> MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a><br>
>>>>><br>
>>>><br>
>>>> Doug,<br>
>>>> I compared the data on miro with the names in the db, they are the same. I dumped the db just to verify there weren't any errant spaces or characters in there and there are none.<br>
>>>><br>
>>>> I tried stepping through the code you posted to me here and it appears the Record is uninitialized at the point at which it tries write the record to the database. Doesn't make sense since I can see that that object is populated. <br>
>>>><br>
>>>> Can you try stepping through with Python PuDB and see what happens on your end?<br>
>>>><br>
>>>> Can you diff /usr/lib/python2.7/dist-packages/MythTV/dataheap.py on your machine with the one on mine? Please see the attached file. This is where it is failing.<br>
>>>><br>
>>>> Thanks again for your help.<br>
>>>><br>
>>>> Dan<br>
>>>><br>
>>>> -- <br>
>>>> My Google Profile<br>
>>><br>
>>><br>
>>><br>
>>> Doug,<br>
>>><br>
>>> I sent this the other day, but it looks like the mailing list didn't like the size of the dataheap.py I attached. Here is the message, but now I copied the file to pastebin.<br>
>>><br>
>>> I compared the data on miro with the names in the db, they are the same. I dumped the db just to verify there weren't any errant spaces or characters in there and there are none.<br>
>>><br>
>>> I tried stepping through the code you posted to me here and it appears the Record is uninitialized at the point at which it tries write the record to the database. Doesn't make sense since I can see that that object is populated. <br>
>>><br>
>>> Can you try stepping through with Python PuDB and see what happens on your end?<br>
>>><br>
>>> Can you diff /usr/lib/python2.7/dist-packages/MythTV/dataheap.py on your machine with the one on mine? Please see the pastebin link below. This is where it is failing.<br>
>>><br>
>>> Thanks again for your help.<br>
>>><br>
>>> Dan<br>
>>><br>
>>> <a href="http://pastebin.com/RKTL18rm" target="_blank">http://pastebin.com/RKTL18rm</a><br>
>>><br>
>>> -- <br>
>>> My Google Profile<br>
>><br>
>><br>
>><br>
>><br>
>> -- <br>
>> My Google Profile<br>
>><br>
>> ________________________________<br>
>><br>
>> mythtv-users mailing list<br>
>> <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
>> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
>> <a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
>> MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a><br>
><br>
><br>
> -- <br>
> Sent from my Android device with K-9 Mail. Please excuse my brevity.<br>
><br>
> _______________________________________________<br>
> mythtv-users mailing list<br>
> <a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
> <a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
> MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a><br>
></p>
</div></div><p dir="ltr">Thanks for your help Doug. I will check with Reymond to see if there is something else with the bindings I should be looking at.</p>
</blockquote></div><br>Finally was able to resolve my issue.</div><div class="gmail_extra"><br></div><div class="gmail_extra">As it turns out my record table was missing the Default recording rule template. After adding the default recording rule template with:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px">"INSERT INTO record VALUES (1,11,0,'21:57:44','2012-08-</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">11</span><span style="font-family:arial,sans-serif;font-size:13px">','21:57:44','2012-08-11','</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">Def</span><span style="font-family:arial,sans-serif;font-size:13px">ault (Template)','','',0,0,'</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">Default</span><span style="font-family:arial,sans-serif;font-size:13px">','Default',0,0,0,0,0,</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">0,'</span><span style="font-family:arial,sans-serif;font-size:13px">Default',6,15,'','','','',</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">0,0,</span><span style="font-family:arial,sans-serif;font-size:13px">1,0,0,0,0,1,-1,'00:00:00',</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">7350</span><span style="font-family:arial,sans-serif;font-size:13px">91,0,0,0,'Default',0,'</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">0000-00-</span><span style="font-family:arial,sans-serif;font-size:13px">00 00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','Default',100,0);"</span></div>
<div class="gmail_extra"><font face="arial, sans-serif"><br></font></div><div class="gmail_extra"><font face="arial, sans-serif">the test python in this thread works successfully. I see no more duplicate entries in recording rules for miro content. Thanks to Bill Meek for his Default recording rule details and Raymond Wagner for helping me determine that the default recording rule was missing. </font></div>
<div class="gmail_extra"><font face="arial, sans-serif"><br></font></div><div class="gmail_extra"><font face="arial, sans-serif">I believe the default recording rule being missing was the result of 1 of 2 issues:</font></div>
<div class="gmail_extra"><font face="arial, sans-serif">1. Failed db upgrade to db schema version 1301 (v0.26, almost 2 years ago)</font></div><div class="gmail_extra"><font face="arial, sans-serif">2. Import from db backup did not contain the default recording rule</font></div>
<div class="gmail_extra"><font face="arial, sans-serif"><br></font></div><div class="gmail_extra"><font face="arial, sans-serif">Anyway, it is resolved.<br clear="all"></font><div><br></div>-- <br><a href="http://www.google.com/profiles/dmfrey" target="_blank">My Google Profile</a><br>
</div></div>