OSDN Git Service

change many function.
[rec10/rec10-git.git] / rec10 / trunk / src / epgdb.py
index 07caf03..494ac22 100644 (file)
@@ -35,12 +35,12 @@ def updatebc(bctype):
         ts2epg.write(tmppath + bctype + "epgdata.xml", chdb.bctypesearch(bctype)['ch'])
         xml2db.xml2db(tmppath + bctype + "epgdata.xml", bctype)
         shutil.copyfile(tmppath + bctype + "epgdata.xml", tmppath + bctype + "epgdata.bak.xml")
-        rec10d.rec10db.update_by_bctype_chdata(bctype)
+        rec10d.rec10db.update_by_bctype_epg_ch(bctype)
     except Exception, inst:
         print type(inst)
         print inst
         xml2db.xml2db(tmppath + bctype + "epgdata.bak.xml", bctype)
-        rec10d.rec10db.update_status_by_bctype_chdata(bctype, "2")
+        rec10d.rec10db.update_status_by_bctype_epg_ch(bctype, "2")
 def updatebc_bak(bctype):
     """
     update epg data by .bak file
@@ -55,7 +55,7 @@ def searchtime2(titletxt, timet, deltatime, chtxt):
     aftertime = aftertime.strftime("%Y%m%d%H%M%S")
     one = ["", "", "", ""]
     tempt = 0
-    d = rec10d.rec10db.select_by_time_ngram_tv(beforetime, aftertime, chtxt)
+    d = rec10d.rec10db.select_by_time_ngram_epg_timeline(beforetime, aftertime, chtxt)
     for chtxtt, title, start, stop ,exp,longexp,category in d:
         #print chtxtt+":"+title+":"+start+":"+stop
         p = n_gram.bigram(titletxt, title)
@@ -86,7 +86,7 @@ def searchtime_auto(keytxt, timet, deltatime):
     beforetime = time.strftime("%Y%m%d%H%M%S")
     aftertime = time + datetime.timedelta(hours=deltatime)
     aftertime = aftertime.strftime("%Y%m%d%H%M%S")
-    d = rec10d.rec10db.select_by_time_auto_suggest_tv(keytxt,beforetime, aftertime)
+    d = rec10d.rec10db.select_by_time_auto_suggest_epg_timeline(keytxt,beforetime, aftertime)
     for chtxtt, title, start, stop ,exp,longexp,category in d:
         btime = start
         btime = btime[0:4] + "-" + btime[4:6] + "-" + btime[6:8] + " " + btime[8:10] + ":" + btime[10:12] + ":00"