[mythtv-users] Mirobridge failing to update mythtv db entries

R.D. Vaughan rdvandroid at gmail.com
Sat Jun 28 17:43:16 UTC 2014


Daniel, 
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. 

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. 

Or you could wait until I'm back but as I wrote that will be awhile. 

Doug 

On June 27, 2014 4:05:29 PM EDT, Daniel Frey <dmfrey at gmail.com> wrote:
>Doug,
>
>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.
>
>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.
>
>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.
>
>Can you try stepping through with Python PuDB and see what happens on
>your
>end?
>
>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.
>
>Thanks again for your help.
>
>Dan
>
>http://pastebin.com/RKTL18rm
>
>
>On Tue, Jun 17, 2014 at 3:43 PM, Daniel Frey <dmfrey at gmail.com> wrote:
>
>>
>>
>>
>> On Fri, Jun 13, 2014 at 3:49 PM, Daniel Frey <dmfrey at gmail.com>
>wrote:
>>
>>>
>>>
>>>
>>> On Fri, Jun 13, 2014 at 1:43 PM, R.D. Vaughan <rdvandroid at gmail.com>
>>> wrote:
>>>
>>>> Daniel,
>>>> 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
>thetvdb.org
>>>> web site to get the Internet number (see end of url) . Then add the
>new
>>>> record, this will avoid MiroBridge adding the record itself.
>>>>
>>>> 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.
>>>>
>>>> I've run out of ideas.
>>>>
>>>> Doug
>>>>
>>>> On June 11, 2014 10:57:35 PM EDT, Daniel Frey <dmfrey at gmail.com>
>wrote:
>>>>>
>>>>>
>>>>> On Jun 11, 2014 9:40 PM, "rdvAndroid at gmail.com"
><rdvandroid at gmail.com>
>>>>> wrote:
>>>>> >
>>>>> > Daniel,
>>>>> >
>>>>> > Cut and paste the following lines in a terminal session on the
>BE
>>>>> thatyou run Mirobridge:
>>>>> > ----------------------------- Cut code starting on next line
>>>>> > python
>>>>> > from MythTV import Record
>>>>> > makeRecordRule = {'chanid': "9999", 'description': u'Mirobridge
>>>>> Record rule used to acquire ttvdb.com artwork',
>>>>> >                                'autometadata': 1, 'season': 1,
>>>>> 'episode': 1, 'category': u'Miro', 'station': u'Miro'  }
>>>>> > makeRecordRule['title'] = "Tekzilla"
>>>>> > makeRecordRule['inetref'] = "999999"
>>>>> > record = Record().create(makeRecordRule)
>>>>> > print record
>>>>> > record.delete()
>>>>> > exit(0)
>>>>> > ---------------------------- Stop cutting code prior to this
>line
>>>>> >
>>>>> > My results with an environment that has a working MiroBridge
>looks
>>>>> like this:
>>>>> > doug at ubuntuQuad:~$ python
>>>>> > Python 2.7.3 (default, Feb 27 2014, 19:37:34)
>>>>> > [GCC 4.7.2] on linux2
>>>>> > Type "help", "copyright", "credits" or "license" for more
>information.
>>>>> > >>> from MythTV import Record
>>>>> > >>> makeRecordRule = {'chanid': "9999", 'description':
>u'Mirobridge
>>>>> Record rule used to acquire ttvdb.com artwork',
>>>>> > ...                                'autometadata': 1, 'season':
>1,
>>>>> 'episode': 1, 'category': u'Miro', 'station': u'Miro'  }
>>>>> > >>> makeRecordRule['title'] = "Tekzilla"
>>>>> > >>> makeRecordRule['inetref'] = "999999"
>>>>> > >>> record = Record().create(makeRecordRule)
>>>>> > >>> print record
>>>>> > <Record Rule 'Tekzilla', Type 11 at 0x10e42c0>
>>>>> > >>> record.delete()
>>>>> > >>> exit(0)
>>>>> > doug at ubuntuQuad:~$
>>>>> >
>>>>> > 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.
>>>>> >
>>>>> > Please paste back the results of your test.
>>>>> >
>>>>> > Thanks
>>>>> >
>>>>> >
>>>>> > Doug
>>>>> > _______________________________________________
>>>>> > mythtv-users mailing list
>>>>> > mythtv-users at mythtv.org
>>>>> > http://www.mythtv.org/mailman/listinfo/mythtv-users
>>>>> > http://wiki.mythtv.org/Mailing_List_etiquette
>>>>> > MythTV Forums: https://forum.mythtv.org
>>>>>
>>>>> Doug,
>>>>> Thanks for your help.  Here is the output I received. It did error
>out.
>>>>>
>>>>> dmfrey at mythcenter:~$ python
>>>>> Python 2.7.3 (default, Feb 27 2014, 19:58:35)
>>>>> [GCC 4.6.3] on linux2
>>>>> Type "help", "copyright", "credits" or "license" for more
>information.
>>>>> >>> from MythTV import Record
>>>>> >>> makeRecordRule = {'chanid': "9999", 'description':
>u'Mirobridge
>>>>> Record rule used to acquire ttvdb.com artwork',
>>>>> ...                                'autometadata': 1, 'season': 1,
>>>>> 'episode': 1, 'category': u'Miro', 'station': u'Miro'  }
>>>>> >>> makeRecordRule['title'] = "Tekzilla"
>>>>> >>> makeRecordRule['inetref'] = "999999"
>>>>> >>> record = Record().create(makeRecordRule)
>>>>> Traceback (most recent call last):
>>>>>   File "<stdin>", line 1, in <module>
>>>>>   File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line
>161,
>>>>> in __init__
>>>>>     DBDataWrite.__init__(self, data, db)
>>>>>   File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line
>317,
>>>>> in __init__
>>>>>     DBData.__init__(self, data, db)
>>>>>   File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line
>169,
>>>>> in __init__
>>>>>     self._setDefs()
>>>>>   File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line
>305,
>>>>> in _setDefs
>>>>>     DBData._setDefs(self)
>>>>>   File "/usr/lib/python2.7/dist-packages/MythTV/database.py", line
>160,
>>>>> in _setDefs
>>>>>     self.__class__._setClassDefs(self._db)
>>>>>   File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line
>118,
>>>>> in _setClassDefs
>>>>>     defaults = cls._template('Default', db=db)
>>>>>   File "/usr/lib/python2.7/dist-packages/MythTV/dataheap.py", line
>128,
>>>>> in _template
>>>>>     tmp = cls._fromQuery("WHERE title=?", (name + "
>(Template)",))\
>>>>> StopIteration
>>>>> >>> print record
>>>>> Traceback (most recent call last):
>>>>>   File "<stdin>", line 1, in <module>
>>>>> NameError: name 'record' is not defined
>>>>> >>> record.delete()
>>>>> Traceback (most recent call last):
>>>>>   File "<stdin>", line 1, in <module>
>>>>> NameError: name 'record' is not defined
>>>>> >>> exit(0)
>>>>>
>>>>> Dan
>>>>>
>>>>> ------------------------------
>>>>>
>>>>> mythtv-users mailing list
>>>>> mythtv-users at mythtv.org
>>>>>
>>>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>>>> http://wiki.mythtv.org/Mailing_List_etiquette
>>>>>
>>>>>
>>>>> MythTV Forums: https://forum.mythtv.org
>>>>>
>>>>>
>>>> --
>>>> Sent from my Android device with K-9 Mail. Please excuse my
>brevity.
>>>>
>>>> _______________________________________________
>>>> mythtv-users mailing list
>>>> mythtv-users at mythtv.org
>>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>>> http://wiki.mythtv.org/Mailing_List_etiquette
>>>> MythTV Forums: https://forum.mythtv.org
>>>>
>>>>
>>> Doug,
>>> 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.
>>>
>>> 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.
>>>
>>> Can you try stepping through with Python PuDB and see what happens
>on
>>> your end?
>>>
>>> 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.
>>>
>>> Thanks again for your help.
>>>
>>> Dan
>>>
>>> --
>>> My Google Profile <http://www.google.com/profiles/dmfrey>
>>>
>>
>>
>> Doug,
>>
>> 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.
>>
>> 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.
>>
>> 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.
>>
>> Can you try stepping through with Python PuDB and see what happens on
>your
>> end?
>>
>> 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.
>>
>> Thanks again for your help.
>>
>> Dan
>>
>> http://pastebin.com/RKTL18rm
>>
>> --
>> My Google Profile <http://www.google.com/profiles/dmfrey>
>>
>
>
>
>-- 
>My Google Profile <http://www.google.com/profiles/dmfrey>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>mythtv-users mailing list
>mythtv-users at mythtv.org
>http://www.mythtv.org/mailman/listinfo/mythtv-users
>http://wiki.mythtv.org/Mailing_List_etiquette
>MythTV Forums: https://forum.mythtv.org

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140628/179d0d99/attachment.html>


More information about the mythtv-users mailing list