X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=rec10%2Ftrunk%2Fsrc%2Fscan_ch.py;h=60d8f7f9d3d12585c7b89b2f0376d5f78243cb34;hb=834ad72ed635ce665792b0d9c1ebf98dd0897d6b;hp=9f0be2ed8dc3e9c1dc04fd6e8207cea2b3ab9ae6;hpb=da6b8533a60a5c1c4530523cdc23f48f4a351767;p=rec10%2Frec10-git.git diff --git a/rec10/trunk/src/scan_ch.py b/rec10/trunk/src/scan_ch.py index 9f0be2e..60d8f7f 100644 --- a/rec10/trunk/src/scan_ch.py +++ b/rec10/trunk/src/scan_ch.py @@ -7,6 +7,7 @@ import os.path import time import commands import traceback +import datetime import chdb import rec10d @@ -16,6 +17,7 @@ import tv2ts tmppath = configreader.getConfPath("tmp")+"/" tssplitterp = configreader.getConfPath("tssplitter") def searchCh(): + rec10d.rec10db.change_installed_in_status(2) #地上デジタル for i in xrange(13,62):#62 recdblist.printuft8ex(u"チャンネルスキャン:地上デジタル CH "+str(i), 200, 200) @@ -70,6 +72,7 @@ def searchCh(): if checkTs("CS24")>0: recdblist.printuft8ex(u"チャンネルスキャン:CSSデジタル CH:CS24", 200, 200) addCh("CS24","cs2","CS") + rec10d.rec10db.change_installed_in_status(100) def checkTs(ch): tv2ts.tv2b25ts(os.path.join(tmppath,"ch_"+str(ch)+".ts"), ch, "1") if os.path.exists(os.path.join(tmppath,"ch_"+str(ch)+".ts")): @@ -84,9 +87,11 @@ def addCh(ch,bctype,chtxthead): try: if ch.find("bs")>-1: if int(lstr)<300: - rec10d.rec10db.add_epg_ch(bctype,chtxthead+"_"+lstr, ch, lstr, u"2010-01-01 00:00:00") + tnow=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + rec10d.rec10db.add_epg_ch(bctype,chtxthead+"_"+lstr, ch, lstr, u"2010-01-01 00:00:00", u"2010-01-01 00:00:00",tnow) else: - rec10d.rec10db.add_epg_ch(bctype,chtxthead+"_"+lstr, ch, lstr, u"2010-01-01 00:00:00") + tnow=datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + rec10d.rec10db.add_epg_ch(bctype,chtxthead+"_"+lstr, ch, lstr, u"2010-01-01 00:00:00", u"2010-01-01 00:00:00",tnow) except Exception, inst: recdblist.addCommonlogEX("Warning", "addCh (scan_ch.py)", str(type(inst)),str(inst)+traceback.format_exc(),log_level=200) checkB25Purchased(ch, prglist[1])