[mythtv-users] Tuner Schedules

Spencer Herzberg spencer.herzberg at gmail.com
Sat Mar 19 00:30:13 UTC 2011


>
>
> >>>> Or, you can write your own script that can be run at the command-line
> or
> >>>> through cron, using the Python bindings.
> >>>>
> >>>>
> http://www.mythtv.org/wiki/0.24_Python_bindings/Connection_Handlers#lockTuner
> >>>> (Description isn't complete, yet, but if you pass a capture card ID,
> you
> >>>> can tell it  to lock a specific tuner--tell mythbackend that tuner is
> >>>> not available, so it won't be used for scheduling.  You'll need to
> keep
> >>>> the connection from the python script to the backend open as long as
> you
> >>>> want the tuner locked--the destructor will unlock anything prior to
> >>>> closing the connection.  So, if done on a cron job, the first script
> >>>> could lock the tuner and keep it open and the second could )
> >> Heh, forgot to finish the thought...  "the second could just kill the
> >> first process."
>
> Posting a copy of the script(s) to the wiki, along with descriptions and
> additional instructions, would be wonderful.
>
> http://www.mythtv.org/wiki/Category:Scripts
> http://www.mythtv.org/wiki/Category:Python_Scripts
>
> You can use one of the Python Script pages to get the "template" for
> setting up code boxes and categories, or feel free to ask for help here
> or in #mythtv-users on IRC.
>
> Thanks,
> Mike
>

I may jump in IRC later tonight or this weekend to ask some more questions.

However, after some simple playing around (with the python bindings)
lockTuner(), it seemed to work a little strangely. The recording didn't
record just like you said, but in MythWeb under Listings, the recording
showed up as "recorded" but "Recorded Programs" didn't show the recording. I
also assumed that it rescheduled it later but I forgot to look before I
deleted the schedule.

Also, when I tried to freeTuner(0) or freeTuner(1) I got:
[stack trace]
File "/usr/lib/pymodules/python2.6/MythTV/methodheap.py", line 141, in free
    res = self.getRecorderDetails(id).hostname
AttributeError: 'MythBE' object has no attribute 'getRecorderDetails'
[/stack trace]

I didn't dig into the source to see what was up, but I thought someone would
know of any problems in the source currently. I'm running Ubuntu 10.04 with
the mythbuntu addon .24 + fixes if that helps. So I just killed the process
that had the MythBE connection and subsequent recordings were skipped, like
the tuner was still locked. This happened to my twice and the only fix was
to restart the server (I suppose restarting mythbackend would have worked
too). I didn't have a ton of time to debug this so I'll try it again later.

Any help would be great!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20110318/529a4395/attachment.html 


More information about the mythtv-users mailing list