[mythtv-users] mythcal - script for synchronising MythTV recording schedule to a Google calendar

Kenneth Emerson kenneth.emerson at gmail.com
Sat Nov 28 07:52:16 UTC 2009

On Sat, Oct 24, 2009 at 1:53 PM, Richard Fearn <richardfearn at gmail.com>wrote:

> Hello,
> > Here's a quick twenty minute rewrite using the python bindings.
> Thanks for that! I've changed mythcal to use the Python bindings
> rather than go directly to the database. (Thanks also to Michael for
> suggesting the bindings.) I've opted to stick with the dictionaries
> for holding program information.
> I've used pytz (http://pypi.python.org/pypi/pytz) to convert the local
> times in the Program objects to UTC.
> The new version is on Google Code:
> http://code.google.com/p/mythcal/
> Regards,
> Rich

I downloaded your script and followed your instructions, but I got an error
from the MythTV python bindings:

Traceback (most recent call last):
  File "./mythcal", line 107, in <module>
    recordings = get_recordings_from_backend()
  File "./mythcal", line 99, in get_recordings_from_backend
    if mythtv.isRecording(recorder):
  File "/usr/local/lib/python2.6/dist-packages/MythTV/MythTV.py", line 295,
in isRecording
    res = self.backendCommand('QUERY_RECORDER
TypeError: sequence item 0: expected string, int found

So, just for grins, I changed line 295 to be:

res = self.backendCommand('QUERY_RECORDER

changing 'recorder' from an int to a string and, lo and behold, I had
entries in my calendar. However, I don't know what I am breaking by changing
this.  Any ideas?


Ken E.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20091128/be40dbe8/attachment.htm>

More information about the mythtv-users mailing list