#if status.getSettings_auto_jbk()==1:
if auto==1 or status.getSettings_auto_jbk()==1:
topt=opt
- if topt!=None:
- if len(topt)==0:
- topt=status.getSettings_auto_opt()
- try:
- maxnum=0
- ch=chdb.searchCHFromChtxt(chtxtt)
- if len(ch['ch'])>2:
- maxnum=epgdb.countSchedule(btimet, etimet)[1]
- maxnum=int(configreader.getConfEnv("bscs_max"))-maxnum
- else:
- maxnum=epgdb.countSchedule(btimet, etimet)[0]
- maxnum=int(configreader.getConfEnv("te_max"))-maxnum
- if maxnum>0:
- if recdb.checkDuplicated(titlet, chtxtt, btimet, etimet)==0:
- recdb.reserveReckey(recdblist.REC_RESERVE,titlet,chtxtt, btimet, etimet,topt)
- except Exception, inst:
- recdblist.addCommonlogEX("Error", "search_keyword_auto_jbk(timerec.py)", str(type(inst)),str(inst)+traceback.format_exc(),log_level=200)
+ if topt==None:
+ topt=status.getSettings_auto_opt()
+ if len(topt)==0:
+ topt=status.getSettings_auto_opt()
+ try:
+ maxnum=0
+ ch=chdb.searchCHFromChtxt(chtxtt)
+ if len(ch['ch'])>2:
+ maxnum=epgdb.countSchedule(btimet, etimet)[1]
+ maxnum=int(configreader.getConfEnv("bscs_max"))-maxnum
+ else:
+ maxnum=epgdb.countSchedule(btimet, etimet)[0]
+ maxnum=int(configreader.getConfEnv("te_max"))-maxnum
+ if maxnum>0:
+ if recdb.checkDuplicated(titlet, chtxtt, btimet, etimet)==0:
+ recdb.reserveReckey(recdblist.REC_RESERVE,titlet,chtxtt, btimet, etimet,topt)
+ except Exception, inst:
+ recdblist.addCommonlogEX("Error", "search_keyword_auto_jbk(timerec.py)", str(type(inst)),str(inst)+traceback.format_exc(),log_level=200)
try:
recdb.reserveAutoKeyword(chtxtt, titlet, btimet, etimet)
except Exception, inst: