3 # Rec10 TS Recording Tools
4 # Copyright (C) 2009-2010 Yukikaze
11 path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
13 def chadd(bctype, chtxt, ch, csch):#すべて文字列
14 rec10d.rec10db.add_epg_ch(bctype,chtxt, ch, csch, u"2010-01-01 00:00:00")
18 chadd(c[0],c[1],c[2],c[3])
19 def new_chdata(bs,cs):
20 rec10d.rec10db.new_epg_ch()
21 chlistadd(getChList(os.path.join(path,"chlist.xml")))
24 chlistadd(getChList(os.path.join(path,"chlist_bs.xml")))
26 #CS放送(スカパーe2)主に基本パックに入ってるものを中心に
27 chlistadd(getChList(os.path.join(path,"chlist_cs.xml")))
32 bs=int(configreader.getenv("bs"))
33 cs=int(configreader.getenv("cs"))
37 def getChList(xmlpath):
38 dom=xml.dom.minidom.parse(file(xmlpath))
40 for ch in dom.getElementsByTagName('channel'):
41 bctype=ch.getAttribute("bctype")
42 chd=ch.getAttribute("ch")
43 csch=ch.getAttribute("csch")
44 chtxt=ch.getAttribute("chtxt")
45 ontv=ch.getAttribute("ontvcode")
46 chlist.append([bctype,ontv,chtxt,chd,csch])
48 if __name__ == "__main__":