
kenneth.emerson at gmail
Nov 27, 2009, 11:52 PM
Post #7 of 12
(851 views)
Permalink
|
|
Re: mythcal - script for synchronising MythTV recording schedule to a Google calendar
[In reply to]
|
|
On Sat, Oct 24, 2009 at 1:53 PM, Richard Fearn <richardfearn [at] gmail>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 > > 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 '+BACKEND_SEP.join([recorder,'IS_RECORDING'])) TypeError: sequence item 0: expected string, int found So, just for grins, I changed line 295 to be: res = self.backendCommand('QUERY_RECORDER '+BACKEND_SEP.join([str(recorder),'IS_RECORDING'])) 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? Regards, Ken E.
|