Author: duncan
Date: Thu May 17 14:59:46 2007
New Revision: 9576
Modified:
branches/rel-1/freevo/src/config.py
branches/rel-1/freevo/src/tv/channels.py
branches/rel-1/freevo/src/tv/plugins/ivtv_record.py
Log:
[ 1720505 ] fix videogroup bad code
Patch from Valera Koval applied
Modified: branches/rel-1/freevo/src/config.py
==============================================================================
--- branches/rel-1/freevo/src/config.py (original)
+++ branches/rel-1/freevo/src/config.py Thu May 17 14:59:46 2007
@@ -138,13 +138,14 @@
desc: A nice description for this VideoGroup.
group_type: Special variable to identify devices like dvb or ivtv. This
can be left as default, 'normal', or set to 'ivtv' or 'dvb'.
+ cmd: Command for execute external prog after the channel
switched, such as 'sudo /usr/local/bin/setuptuner'
"""
def __init__(self, vdev='/dev/video', vvbi='/dev/vbi', adev=None,
input_type='tuner',
input_num=0, tuner_norm='NTSC', tuner_chanlist='us-cable',
tuner_type='internal', tuner_chan=None,
record_group=None, desc='Freevo default VideoGroup',
- group_type='normal'):
+ group_type='normal', cmd=None):
# XXX: Put checks in here for supplied values.
self.vdev = vdev
@@ -161,6 +162,9 @@
self.group_type = group_type
self.in_use = FALSE
self.tuner = None
+ self.cmd = None
+ if cmd != None and isinstance(cmd,str) and cmd.strip() != '':
+ self.cmd = cmd.strip()
def __str__(self):
s = '<%s: %s %s %s %s %s %s>' % (self.group_type, self.vdev,
self.vvbi, self.adev,
Modified: branches/rel-1/freevo/src/tv/channels.py
==============================================================================
--- branches/rel-1/freevo/src/tv/channels.py (original)
+++ branches/rel-1/freevo/src/tv/channels.py Thu May 17 14:59:46 2007
@@ -202,12 +202,11 @@
except:
print String(_('Failed to set freq for channel %s.') % chan)
- if vg.desc == "INTER":
- cmd="sudo /usr/local/sbin/set_inter"
+ if vg.cmd:
if DEBUG:
- print "run cmd: %s" % cmd
+ _debug_("run cmd: %s" % vg.cmd, 1)
import os
- retcode=os.system(cmd)
+ retcode=os.system(vg.cmd)
if DEBUG:
print "exit code: %g" % retcode
Modified: branches/rel-1/freevo/src/tv/plugins/ivtv_record.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/ivtv_record.py (original)
+++ branches/rel-1/freevo/src/tv/plugins/ivtv_record.py Thu May 17 14:59:46 2007
@@ -135,11 +135,10 @@
if DEBUG: print 'Setting Channel to %s' % self.prog.tunerid
fc.chanSet(str(self.prog.tunerid), False)
- if vg.desc == "INTER":
- cmd="sudo /usr/local/sbin/set_inter"
+ if vg.cmd != None:
if DEBUG:
- print "run cmd: %s" % cmd
- retcode=os.system(cmd)
+ print "run cmd: %s" % vg.cmd
+ retcode=os.system(vg.cmd)
if DEBUG:
print "exit code: %g" % retcode
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog