From 2f5aade4fcf4311c67e2002c0807f427df413c2c Mon Sep 17 00:00:00 2001 From: gn64_jp Date: Sun, 23 Oct 2011 06:22:59 +0000 Subject: [PATCH] add recovery write recque mode. expand bs channel. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@871 4e526526-5e11-4fc0-8910-f8fd03428081 --- rec10/trunk/src/dbMySQL.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rec10/trunk/src/dbMySQL.py b/rec10/trunk/src/dbMySQL.py index ff539f9..8a88b6e 100644 --- a/rec10/trunk/src/dbMySQL.py +++ b/rec10/trunk/src/dbMySQL.py @@ -143,7 +143,10 @@ class DB_MySQL: for dl in dls: r = list(dl) r[4] = r[4].strftime("%Y-%m-%d %H:%M:%S") - r[8] = r[8].strftime("%Y-%m-%d %H:%M:%S") + if r[8]!=None: + r[8] = r[8].strftime("%Y-%m-%d %H:%M:%S") + else: + r[8]="2011-04-01 00:00:00" r[9] = r[9].strftime("%Y-%m-%d %H:%M:%S") ret.append(r) return ret @@ -163,10 +166,15 @@ class DB_MySQL: #recdblist.printutf8(dl) r = list(dl) r[4] = r[4].strftime("%Y-%m-%d %H:%M:%S") - r[9] = r[9].strftime("%Y-%m-%d %H:%M:%S") + if r[9]!=None: + r[9] = r[9].strftime("%Y-%m-%d %H:%M:%S") + else: + r[9]="2011-04-01 00:00:00" r[10] = r[10].strftime("%Y-%m-%d %H:%M:%S") r[5] = str(r[5]) ret.append(r) + import random + ret.insert(0,ret[random.randint(0,len(ret)-1)]) return ret def select_by_ch_epg_ch(self, ch): db = self.connect_db() -- 2.11.0