return str(i)
def record(channel,tsid,out,timelength,decode=1):
if not os.path.exists(tmppath+u"rec.sh"):
- ft=open(tmppath+u"rec.sh")
+ ft=open(tmppath+u"rec.sh","w")
ft.write(u"#!/bin/bash\n/bin/cat $1 > $2")
ft.close()
os.system(u"chmod +x "+tmppath+u"rec.sh")
adapt=getActiveAdapter(channel)
my_env=recdblist.getEnv()
if adapt!=None:
- f=open(out,"w")
tunecmd=configreader.getConfDVB("DVBtune")+u" "+adapt+u" "+channel2freq(channel)+u" "+tsid
reccmd=u"/bin/cat \""+configreader.getConfDVB("DVBadapter")+adapt+u"/dvr0\" > \""+out+u"\""
if decode==1:
p2.wait()
os.kill(p1.pid,signal.SIGKILL)
p1.wait()
- f.close()
else:
recdblist.printutf8ex(u"tuner busy",100,100)
def useDVB():