-def checkTs(ch):
- tv2ts.tv2b25ts(os.path.join(tmppath,"ch_"+str(ch)+".ts"), ch, "1")
+def checkTs(ch,tsid="0"):
+ if os.path.exists(os.path.join(tmppath,"ch_"+str(ch)+".ts")):
+ os.remove(os.path.join(tmppath,"ch_"+str(ch)+".ts"))
+ if os.path.exists(os.path.join(tmppath,"ch_"+str(ch)+".ts.b25")):
+ os.remove(os.path.join(tmppath,"ch_"+str(ch)+".ts.b25"))
+ tv2ts.tv2b25ts(os.path.join(tmppath,"ch_"+str(ch)+".ts"), ch, "1",tsid)
+ if os.path.exists(os.path.join(tmppath,"ch_"+str(ch)+".ts.b25")):
+ os.remove(os.path.join(tmppath,"ch_"+str(ch)+".ts.b25"))