OSDN Git Service

fix error.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Tue, 10 Apr 2012 10:48:16 +0000 (10:48 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Tue, 10 Apr 2012 10:48:16 +0000 (10:48 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@931 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/timerec.py

index 4937208..f93d680 100644 (file)
@@ -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: