[mythtvnz] epgsnoop confusing Prime and TVNZ 7

Robin Gilks g8ecj at gilks.org
Sun Aug 3 05:46:35 BST 2008


> On Sun, 2008-08-03 at 16:13 +1200, Robin Gilks wrote:
>> Guess I'll have to improve the script that runs
>> dvbtune/epgsnoop to avoid this since it of course overrides existing
>> Prime
>> data.
>
> The little script below might help. I use it like so in my epg script;
>
> while [ "`/usr/local/bin/myth_recorder_status 5 6 7`" != 'FREE' ]; do
>     echo "DVB card is in use by MythTV, sleeping for a bit."
>     sleep 30m
> done
>
> ------------------------- script --------------------------
> #!/usr/bin/python
>
> import sys
> from MythTV import MythTV
>
> if len(sys.argv) < 2:
>     print "Usage: myth_recorder_status <RECORDER> [<RECORDER> ...]"
>     sys.exit(2)
>
> m = MythTV()
> recorders_that_exist = m.getRecorderList()
>
> res = 'FREE'
> for recorder in sys.argv[1:]:
>     if int(recorder) not in recorders_that_exist:
>         print 'NOT VALID RECORDER (%s)' % recorder
>         sys.exit(1)
>     if m.isRecording(recorder):
>         res = 'RECORDING'
> print res
> sys.exit(0)
> ------------------------- end --------------------------
>

Thats the one - it must have arrived about 10 seconds before I pressed
'send' asking about this very same script :-)


-- 
Robin Gilks





More information about the mythtvnz mailing list