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
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)
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"