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

Daniel Frey dmfrey at gmail.com
Thu Jun 12 02:57:35 UTC 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20140611/381b7528/attachment.html>


More information about the mythtv-users mailing list