+ return ret
+def getB25UnparchasedList(logtxt):
+ warning = 0
+ ret=[]
+ for strt in logtxt.splitlines():
+ if strt.find("unpurchased ECM")>-1:
+ warning=1
+ if strt.find("total TS packet")>-1 and warning>0:
+ warning=0
+ if strt.find("channel")>-1 and warning>0:
+ txt=strt.replace("channel:","")
+ txt=txt.replace("\n","")
+ txt=txt.replace(" ","")
+ ret.append(txt)
+ return ret
+def checkB25Purchased(ch,logtxt):
+ chlists=chdb.searchAllCHFromCh(ch)
+ upl=getB25UnparchasedList(logtxt)
+ if len(upl)>0 and len(chlists)>0:
+ for chl in chlists:
+ if chl != None:
+ if chl['csch'] in upl:
+ chdb.changeCHShow(chl['chtxt'],"0")