3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009 Yukikaze
8 def ontvsearch(ontvin):
10 for datum in rec10d.rec10db.select_by_ontv_chdata(ontvin):
11 rett={'bctype':datum[0],'ontv':datum[1],'chtxt':datum[2],'ch':datum[3],'csch':datum[4],'update':datum[5]}
14 def chtxtsearch(chtxtin):
16 for datum in rec10d.rec10db.select_by_chtxt_chdata(chtxtin):
17 rett={'bctype':datum[0],'ontv':datum[1],'chtxt':datum[2],'ch':datum[3],'csch':datum[4],'update':datum[5]}
20 def bctypesearch(bctypein):
22 for datum in rec10d.rec10db.select_by_bctype_chdata(bctypein):
23 rett={'bctype':datum[0],'ontv':datum[1],'chtxt':datum[2],'ch':datum[3],'csch':datum[4],'update':datum[5]}
28 for datum in rec10d.rec10db.select_by_ch_chdata(chin):
29 rett={'bctype':datum[0],'ontv':datum[1],'chtxt':datum[2],'ch':datum[3],'csch':datum[4],'update':datum[5]}
34 for datum in rec10d.rec10db.select_all_chdata():
35 rett={'bctype':datum[0],'ontv':datum[1],'chtxt':datum[2],'ch':datum[3],'csch':datum[4],'update':datum[5]}
43 for datum in rec10d.rec10db.select_get_update_chdata("6"):
47 if bctype=="cs" or bctype==u"cs":
52 rec10d.rec10db.update_by_bctype_chdata(bctype)
53 elif bctype=="cs2" or bctype==u"cs2":
58 rec10d.rec10db.update_by_bctype_chdata(bctype)
59 elif bctype=="bs" or bctype==u"bs":
64 rec10d.rec10db.update_by_bctype_chdata(bctype)
69 rec10d.rec10db.update_by_bctype_and_chtxt_chdata(bctype,chtxt)
73 # db=sqlite3.connect(dbpath)
74 # for bctype, ontv, chtxt, ch, csch ,updatetime in db.execute("SELECT bctype,ontv,chtxt,ch,csch,updatetime FROM chdata"):
75 # print (bctype+","+ontv+","+chtxt+","+ch+","+csch+","+updatetime)
79 #print ontvsearch("1062.ontvjapan.com")