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])
20 rec10d.rec10db.new_epg_ch()
21 addCHlist(getCHlist(os.path.join(path,"chlist.xml")))
24 addCHlist(getCHlist(os.path.join(path,"chlist_bs.xml")))
26 #CS放送(スカパーe2)主に基本パックに入ってるものを中心に
27 addCHlist(getCHlist(os.path.join(path,"chlist_cs.xml")))
32 bs=int(configreader.getEnvSetting("bs"))
33 cs=int(configreader.getEnvSetting("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__":