OSDN Git Service

fix bug,
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Thu, 26 Nov 2009 15:46:25 +0000 (15:46 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Thu, 26 Nov 2009 15:46:25 +0000 (15:46 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@272 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/auto_rec.py
rec10/trunk/src/ts2epg.py
rec10/trunk/src/ts2x264.py
rec10/trunk/src/tv2mkv.py
rec10/trunk/src/tv2mp4.py
rec10/trunk/src/tv2ts.py

index 0d21b18..51460f5 100644 (file)
@@ -58,7 +58,7 @@ def calc_key(chtxt,title,desc):
     """
 
     """
     """
 
     """
-    kyoukai=800
+    kyoukai=1200
     title=u" "+title+u" "
     desc=u" "+desc+u" "
     str1=title*2+desc+title*2##タイトルは重視したいので幾度か足す。
     title=u" "+title+u" "
     desc=u" "+desc+u" "
     str1=title*2+desc+title*2##タイトルは重視したいので幾度か足す。
index cf0965a..c1bfce6 100644 (file)
@@ -18,13 +18,13 @@ def write(pout, ch):
     print u"ts2epg処理"
     bctype = chdb.chsearch(ch)['bctype']
     print ch + ":" + bctype
     print u"ts2epg処理"
     bctype = chdb.chsearch(ch)['bctype']
     print ch + ":" + bctype
-    timet = "10"
+    timet = "90"
     if re.search(u'cs', bctype):
         mode = "/CS"
     if re.search(u'cs', bctype):
         mode = "/CS"
-        timet = "10"
+        timet = "180"
     elif re.search(u'bs', bctype):
         mode = "/BS"
     elif re.search(u'bs', bctype):
         mode = "/BS"
-        timet = "10"
+        timet = "240"
     else:
         mode = chdb.bctypesearch(u'te' + ch)['ontv']
     epgdump = configreader.getpath("epgdump")
     else:
         mode = chdb.bctypesearch(u'te' + ch)['ontv']
     epgdump = configreader.getpath("epgdump")
index f45a186..fa6a714 100644 (file)
@@ -85,5 +85,5 @@ def encode(pin,pout,size,isAnime,is2pass):
         s=s+len("\n")
         stxt=stxt[s:]
     txt="\n####mencoder-log_"+size+"####\n"+stxt
         s=s+len("\n")
         stxt=stxt[s:]
     txt="\n####mencoder-log_"+size+"####\n"+stxt
-    f.write(txt)
+    f.write(txt.encode('utf-8'))
     f.close()
\ No newline at end of file
     f.close()
\ No newline at end of file
index ba1a4ae..d9e7cd9 100644 (file)
@@ -31,6 +31,6 @@ def avi2mkv(pin,pout):
     txt = txt+commands.getoutput(doexe.encode('utf-8'))
     txt = "\n####mkvmerge-log####\n"+txt
     f=open(logo,'a')
     txt = txt+commands.getoutput(doexe.encode('utf-8'))
     txt = "\n####mkvmerge-log####\n"+txt
     f=open(logo,'a')
-    f.write(txt)
+    f.write(txt.encode('utf-8'))
     f.close()
     sys.stdout.flush()
\ No newline at end of file
     f.close()
     sys.stdout.flush()
\ No newline at end of file
index 7131d6a..03f87f6 100644 (file)
@@ -28,7 +28,7 @@ def avi2mp4(pin,pout):
     audiopath=os.path.join(dir,title+u"_audio.mp3")
     videopath=os.path.join(dir,title+u"_video.h264")
     #doexe = exe.encode('utf-8') + u' \"' + pin.encode('utf-8') + u'\" \"' + pout.encode('utf-8') + u'\"'
     audiopath=os.path.join(dir,title+u"_audio.mp3")
     videopath=os.path.join(dir,title+u"_video.h264")
     #doexe = exe.encode('utf-8') + u' \"' + pin.encode('utf-8') + u'\" \"' + pout.encode('utf-8') + u'\"'
-    exe1=exe+u" -aviraw audio u'"+pin+u"\'"
+    exe1=exe+u" -aviraw audio \'"+pin+u"\'"
     exe2=exe+u" -aviraw video \'"+pin+u"\'"
     exefin=exe+u" -new -fps 29.97 -add \'"+videopath+u"\'#video -add \'"+audiopath+u"\'#audio \'"+pout+u"\'"
     logo=pin.replace(u".avi",u".log")
     exe2=exe+u" -aviraw video \'"+pin+u"\'"
     exefin=exe+u" -new -fps 29.97 -add \'"+videopath+u"\'#video -add \'"+audiopath+u"\'#audio \'"+pout+u"\'"
     logo=pin.replace(u".avi",u".log")
@@ -41,7 +41,7 @@ def avi2mp4(pin,pout):
     os.remove(videopath)
     txt = "\n####MP4Box-log####\n"+txt
     f=open(logo,'a')
     os.remove(videopath)
     txt = "\n####MP4Box-log####\n"+txt
     f=open(logo,'a')
-    f.write(txt)
+    f.write(txt.encode('utf-8'))
     f.close()
     sys.stdout.flush()
     time.sleep(10)
     f.close()
     sys.stdout.flush()
     time.sleep(10)
@@ -79,7 +79,7 @@ def mkv2mp4(pin,pout):
     os.remove(videopath)
     txt = "\n####MKV2MP4-log####\n"+txt
     f=open(logo,'a')
     os.remove(videopath)
     txt = "\n####MKV2MP4-log####\n"+txt
     f=open(logo,'a')
-    f.write(txt)
+    f.write(txt.encode('utf-8'))
     f.close()
     sys.stdout.flush()
     time.sleep(10)
     f.close()
     sys.stdout.flush()
     time.sleep(10)
index 94aa13b..5cf9e9e 100644 (file)
@@ -81,7 +81,7 @@ def tv2b25ts(pout, ch, time):
     txt = txt + commands.getoutput(doexe.encode('utf-8'))
     logo=pout.replace(".ts.b25",".log")
     f=open(logo,'w')
     txt = txt + commands.getoutput(doexe.encode('utf-8'))
     logo=pout.replace(".ts.b25",".log")
     f=open(logo,'w')
-    f.write(txt)
+    f.write(txt.encode('utf-8'))
     f.close()
     if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
         status.changeBSCSRecording(-1)
     f.close()
     if len(ch) > 2:#BS/CSは100とかCS??とかなので3文字以上
         status.changeBSCSRecording(-1)
@@ -118,7 +118,7 @@ def b252tsmix(pin, pout):
             stxt=stxt[s:]
         txt = "\n####b25-log####\n"+stxt
         f=open(logo,'a')
             stxt=stxt[s:]
         txt = "\n####b25-log####\n"+stxt
         f=open(logo,'a')
-        f.write(txt)
+        f.write(txt.encode('utf-8'))
         f.close()
 def tsmix2ts(pin, pout, csch):#csch=0ならcsの処理をしない
     """if csch==0:
         f.close()
 def tsmix2ts(pin, pout, csch):#csch=0ならcsの処理をしない
     """if csch==0:
@@ -132,7 +132,7 @@ def tsmix2ts(pin, pout, csch):#csch=0ならcsの処理をしない
     stxt=txt
     txt = "\n####tssplit-log####\nCommand:"+doexe+"\nlog:\n"+stxt
     f=open(logo,'a')
     stxt=txt
     txt = "\n####tssplit-log####\nCommand:"+doexe+"\nlog:\n"+stxt
     f=open(logo,'a')
-    f.write(txt)
+    f.write(txt.encode('utf-8'))
     f.close()
     time.sleep(1)
     if os.access(pout, os.F_OK):
     f.close()
     time.sleep(1)
     if os.access(pout, os.F_OK):