From: gn64_jp Date: Tue, 10 Apr 2012 10:48:16 +0000 (+0000) Subject: fix error. X-Git-Url: http://git.osdn.net/view?p=rec10%2Frec10-git.git;a=commitdiff_plain;h=de9a87b985c5ff8e4237a0b9198699133c925851 fix error. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@931 4e526526-5e11-4fc0-8910-f8fd03428081 --- diff --git a/rec10/trunk/src/timerec.py b/rec10/trunk/src/timerec.py index 4937208..f93d680 100644 --- a/rec10/trunk/src/timerec.py +++ b/rec10/trunk/src/timerec.py @@ -302,23 +302,24 @@ def search_keyword(key): #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: