OSDN Git Service

maybe last fix for 0.9.0
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sun, 6 Dec 2009 15:21:26 +0000 (15:21 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sun, 6 Dec 2009 15:21:26 +0000 (15:21 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@301 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/chdb.py
rec10/trunk/src/dbMySQL.py
rec10/trunk/src/timerec.py

index 0a55525..274259b 100644 (file)
@@ -50,6 +50,7 @@ def update():
     CSupdate = 0
     CS2update = 0
     BSupdate = 0
+    rec10d.rec10db.set_new_status("12")
     for datum in rec10d.rec10db.select_get_update_epg_ch("6"):
         bctype = datum[0]
         if bctype == "cs1" or bctype == u"cs1":
index ca7d58c..5f6b4b8 100644 (file)
@@ -179,6 +179,17 @@ class DB_MySQL:
             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 \
index 3ac9764..e532bb3 100644 (file)
@@ -323,7 +323,7 @@ def type_final(typetxt,chtxt,title,bt,et,opt):
         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")
@@ -446,7 +446,6 @@ def type_decode_que(typetxt,chtxt,title,bt,et,opt):
                 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: