r[5] = r[5].strftime("%Y-%m-%d %H:%M:%S")
ret.append(r)
return ret
+ def set_new_status(self,dhour):
+ db = self.connect_db()
+ dbexe = db[1].execute("UPDATE epg_ch \
+ SET status = 1 \
+ WHERE \
+ ( \
+ updatetime < DATE_SUB(now(),INTERVAL " + dhour + " HOUR) \
+ AND \
+ status = 0 \
+ )"\
+ )
def select_get_update_epg_ch(self, dhour):
db = self.connect_db()
dbexe = db[1].execute("SELECT bctype,chtxt,status FROM epg_ch \
recdb.rec_reckey(typetxting, newtitle, chtxt, btime, etime, opt)
recdblist.printutf8(u"録画開始 "+newtitle+" "+btime+" "+etime)
tv2avi.timetv2b25(recpath + "/" + newtitle + ".avi", chtxt, btime, etime, opt)
- recdb.del_reckey(typetxting, title, chtxt, btime)
+ recdb.del_reckey(typetxting, newtitle, chtxt, btime)
if not re.search("R", opt):
tnow = datetime.datetime.now()
bt = datetime.datetime.strptime(btime, "%Y-%m-%d %H:%M:%S")
else:
shutil.copy(os.path.join(recpath,title+".ts"), os.path.join(movepath,title+".ts"))
recdb.rec_reckey(recdblist.REC_MOVE_END, title, chtxt, btime, etime, opt)
- #recdblist.printutf8(checker.checkB25Decode(recpath + "/" + title + ".ts.b25", recpath + "/" + title + ".ts"))
if checker.checkB25Decode(recpath + "/" + title + ".ts.b25", recpath + "/" + title + ".ts") == 1:
os.remove(recpath + "/" + title + ".ts.b25")
else: