""
self.close_db(db)
self.new_epg_timeline("")
- self.new_epg_ch("")
+ self.new_epg_ch()
self.new_in_timeline_log()
self.new_in_auto_bayes_key()
self.new_in_auto_jbk_key()
self.new_auto_proc()
+ self.new_in_status()
def connect_db(self):
"""
dbへの接続
chtxt VARCHAR(15),\
ch VARCHAR(20),\
csch VARCHAR(20),\
- chname VARCHAR(40),\
+ chname VARCHAR(100),\
updatetime DATETIME,\
status TINYINT\
)')
bscsrec TINYINT DEFAULT 0,\
b252ts TINYINT DEFAULT 0\
)")
- db[1].execute("INSERT IGNORE into status VALUE (0,0,0,0)")
+ db[1].execute("INSERT IGNORE into in_status VALUE (0,0,0,0)")
except:
""
-
self.close_db(db)
def select_all_in_status(self):
db = self.connect_db()
r[3]=str(r[3])
ret.append(r)
return ret
- self.close_db(db)
+
def change_ts2avi_in_status(self,i):
"""
statuをiだけ増減する
retall = db[1].fetchall()
self.close_db(db)
return retall
- def new_epg_ch(self, bctype):
- db = self.connect_db()
- try:
- db[1].execute("DELETE FROM ch WHERE bctype = %s", (bctype,))
- except:
- ""
- try:
- db[1].execute('\
- CREATE TABLE epg_ch \
- (\
- bctype VARCHAR(20),\
- channel VARCHAR(20) NOT NULL,\
- display VARCHAR(100),\
- UNIQUE unich(bctype,channel)\
- )')
- except:
- ""
+ #def new_epg_ch(self, bctype):
+ # db = self.connect_db()
+ # try:
+ # db[1].execute("DELETE FROM ch WHERE bctype = %s", (bctype,))
+ # except:
+ # ""
+ # try:
+ # db[1].execute('\
+ # CREATE TABLE epg_ch \
+ # (\
+ # bctype VARCHAR(20),\
+ # channel VARCHAR(20) NOT NULL,\
+ # display VARCHAR(100),\
+ # UNIQUE unich(bctype,channel)\
+ # )')
+ # except:
+ # ""
#db.commit()
- self.close_db(db)
+ # self.close_db(db)
#def add_epg_ch(self, bctype, channel, display):
# db = self.connect_db()
## db[1].execute('INSERT IGNORE INTO epg_ch VALUES (%s,%s,%s)', (bctype, channel, display))
rec10d.rec10db.new_epg_timeline(bctype)
rec10d.rec10db.add_multi_epg_timeline(tvlists)
def writemultichDB(chlists):
- for bctype,ontv,dn in chlists.items():
+ for bctype,ontv,dn in chlists:
rec10d.rec10db.update_chname_by_ontv_epg_ch(ontv, dn)
def parseDocument(p, xmlfile):
f = open(xmlfile, 'r')