OSDN Git Service

fix whose name containing "." can't be recorded bug.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sun, 26 Jul 2009 01:48:55 +0000 (01:48 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sun, 26 Jul 2009 01:48:55 +0000 (01:48 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@78 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/audioconvert.py [deleted file]
rec10/trunk/src/config.ini
rec10/trunk/src/install.py
rec10/trunk/src/recdb.py
rec10/trunk/src/ts2epg.py
rec10/trunk/src/ts2x264.py
rec10/trunk/src/ts2xvid.py
rec10/trunk/src/tv2avi.py
rec10/trunk/src/tv2ts.py
rec10/trunk/src/xml2db.py

diff --git a/rec10/trunk/src/audioconvert.py b/rec10/trunk/src/audioconvert.py
deleted file mode 100644 (file)
index 829af76..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-def audio2ogg(pin,pout):
-    pout = pout.encode('utf-8')
-    pin = pin.encode('utf-8')
-    """
-    pinで指定されたファイルをpoutにoggでエンコードして書き出す
-    """
-
-    exe="mencoder \'"+pin+"\' -quiet -oac mp3lame -lameopts cbr:br=128 -o "+pout
-
-    if dualpass==1:
-        pas1exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=1:turbo=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
-        pas2exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
-        pas1exe="/usr/bin/nice -n 19 "+pas1exe
-        pas2exe="/usr/bin/nice -n 19 "+pas2exe
-        print pas2exe
-        os.system(pas1exe)
-        print "1pass終了"
-        time.sleep(5)
-        os.system(pas2exe)
-    else:
-        pas1exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto -oac mp3lame -lameopts cbr:br=128  -o \'"+pout+"\'"
-        pas1exe="/usr/bin/nice -n 19 "+pas1exe
-        os.system(pas1exe)
-    status.setEncoding(status.getEncoding()-1)
\ No newline at end of file
index 7f3f072..85929f2 100644 (file)
@@ -1,16 +1,11 @@
 [path]
 recpt1=/usr/local/bin/recpt1
-recpt1-bak=/pt1-tools/recpt1/recpt1
-b25-BAK=/pt1-tools/b25/b25
 b25=/usr/local/bin/b25
 splitt=/pt1-tools/tstools/TsSplitter.exe
 bontsdemux=/pt1-tools/tstools/BonTsDemux.exe
-tsepg2xml=/pt1-tools/tstools/tsEpg2xml/tsEpg2xml.exe
 temppath=/home/ftpusr/ftp1/rec-temp
 recpath-bak=/home/ftpusr/ftp3/Recording
 recpath=/home/ftpusr/ftp1/rec-temp
-cmdow=/pt1-tools/tstools/cmdow.exe
-cmdwine=wine /pt1-tools/tstools/cmdow.exe /run /hid
 epgdump=/pt1-tools/tstools/epgdump
 gridserver_port=10910
 wine=wine 
index 48956c4..9eda04a 100644 (file)
@@ -2,8 +2,8 @@
 # coding: UTF-8
 # Rec10 TS Recording Tools
 # Copyright (C) 2009 Yukikaze
-import epgdb
+import timerec
 import chdate
 
-epgdb.updateall()
 chdate
+timerec.task()
\ No newline at end of file
index 5b6c532..dbb768d 100644 (file)
@@ -25,6 +25,7 @@ global REC_FIN_DECODE
 global REC_FIN_LOCAL
 global REC_MISS_DECODE
 global REC_TS_DECODING
+global REC_TS_RECORDING
 REC_RESERVE="res"
 REC_FINAL_RESERVE="rec"
 REC_END="end"
@@ -39,6 +40,8 @@ REC_FIN_DECODE="tsfin"
 REC_FIN_LOCAL="fin_local"
 REC_MISS_DECODE="tsmiss"
 REC_TS_DECODING="tsdecoding"
+REC_TS_RECORDING="tsrecording"
+
 try:
     db.execute('create table rectime (type TEXT,chtxt TEXT,title TEXT,btime TEXT,etime TEXT,deltatime TEXT,deltaday TEXT,opt TEXT,id INTEGER PRIMARY KEY,UNIQUE(type,chtxt,title,btime,deltaday))')
 except:
index 2d83c52..c55150d 100644 (file)
@@ -20,13 +20,12 @@ def write(pout,ch):
     timet="180"
     if re.search(u'cs',bctype):
         mode="/CS"
-        timet="240"
+        timet="180"
     elif re.search(u'bs',bctype):
         mode="/BS"
         timet="180"
     else :
         mode=chdb.bctypesearch(u'te'+ch)['ontv']
-    tsepg2xml=configreader.getpath("tsepg2xml")
     epgdump=configreader.getpath("epgdump")
     if os.access(pout+".ts", os.F_OK):
         os.remove(pout+".ts")
@@ -41,7 +40,6 @@ def write(pout,ch):
         t=t+1
         if t>10:
             break
-    #exe="export LANG=ja_JP.UTF-8 && /usr/bin/nice -n 19 wine "+tsepg2xml+" "+mode+" "+pout+".ts >"+pout
     exe="export LANG=ja_JP.UTF-8 && /usr/bin/nice -n 15 "+epgdump+" "+mode+" "+pout+".ts "+pout
     print exe
     os.system(exe)
index 3fa1332..eb7a36a 100644 (file)
@@ -55,8 +55,8 @@ def ts2x264(pin,pout,opts):#sizeは"HD"か"SD"
         bitrate="bitrate="+tv2avi.Bitrate_HD
 
     if dualpass==1:
-        pas1exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=1:turbo=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
-        pas2exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
+        pas1exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=1:turbo=2 -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
+        pas2exe="mencoder \'"+pin+"\' -quiet -ovc x264 "+encvf+" -x264encopts "+bitrate+":threads=auto:pass=2 -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
         pas1exe="/usr/bin/nice -n 19 "+pas1exe
         pas2exe="/usr/bin/nice -n 19 "+pas2exe
         print pas2exe
index 4371678..3bfb420 100644 (file)
@@ -52,8 +52,8 @@ def ts2xvid(pin,pout,opts):#sizeは"HD"か"SD"
         bitrate="bitrate="+tv2avi.Bitrate_HD
 
     if dualpass==1:
-        pas1exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=1:turbo -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
-        pas2exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=2 -passlogfile "+pin+".log "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
+        pas1exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=1:turbo -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o /dev/null"
+        pas2exe="mencoder \'"+pin+"\' -ovc xvid "+encvf+" -xvidencopts "+bitrate+":threads=2:pass=2 -passlogfile \'"+pin+".log\' "+"-oac mp3lame -lameopts cbr:br=128 -o \'"+pout+"\'"
         pas1exe="/usr/bin/nice -n 19 "+pas1exe
         pas2exe="/usr/bin/nice -n 19 "+pas2exe
         print pas2exe
index f84e1a0..ea39b0a 100644 (file)
@@ -180,7 +180,6 @@ def b252avi(pout, chtxt,opt):
 def dualaudiots2avi(pin, pout):
     bontsdemux = configreader.getpath('bontsdemux')
     wine = configreader.getpath('wine')
-    cmdwine = configreader.getpath('cmdwine')
     bonpin = "Z:\\" + pin[1:]
     outf = os.path.splitext(pin)[0]
     bonpout = "Z:\\" + outf[1:]
@@ -200,7 +199,6 @@ def dualaudiots2avi(pin, pout):
 def dualaudio2sep(pin,pout,delay):
     bontsdemux = configreader.getpath('bontsdemux')
     wine = configreader.getpath('wine')
-    cmdwine = configreader.getpath('cmdwine')
     bonpin = "Z:\\" + pin[1:]
     outf = os.path.splitext(pin)[0]
     bonpout = "Z:\\" + outf[1:]
@@ -236,7 +234,6 @@ def dualaudio2sep(pin,pout,delay):
 def pentaaudiots2avi(pin, pout):
     bontsdemux = configreader.getpath('bontsdemux')
     wine = configreader.getpath('wine')
-    cmdwine = configreader.getpath('cmdwine')
     bonpin = "Z:\\" + pin[1:]
     outf = os.path.splitext(pin)[0]
     bonpout = "Z:\\" + outf[1:]
index 189204f..4ccf620 100644 (file)
@@ -32,6 +32,7 @@ def tv2ts(pout,ch,csch,time):
     #tsmix2ts(temp[0]+"mix."+temp[1],pout,csch)
     #os.remove(temp[0]+"mix."+temp[1])
     temp=pout.split(".")
+    ext=os.path.splitext(pout)[1]#ext=".なんたら"
     #t=base64.b16encode(pout)
     #t=t[0:30]
     t=hashlib.md5(pout).hexdigest()
@@ -41,17 +42,18 @@ def tv2ts(pout,ch,csch,time):
     tempt=os.path.split(pout)
     path=tempt[0]
     tv2b25ts(pout+".b25",ch,time)
-    b252tsmix(pout+".b25",path+"/"+t+"."+temp[1])
-    tsmix2ts(path+"/"+t+"."+temp[1],pout,csch)
+    b252tsmix(pout+".b25",path+"/"+t+ext)
+    tsmix2ts(path+"/"+t+ext,pout,csch)
     #os.remove(path+"/"+t+"."+temp[1])
     if os.access(pout, os.F_OK):
         try:
-            os.remove(path+"/"+t+"."+temp[1])
+            os.remove(path+"/"+t+ext)
         except:
             ""
 
 def b252ts(pout,ch,csch):
     temp=pout.split(".")
+    ext=os.path.splitext(pout)[1]#ext=".なんたら"
     #m=hashlib.md5
     #m.update(pout)
     #t=m.hexdigest()
@@ -62,12 +64,12 @@ def b252ts(pout,ch,csch):
     tempt=os.path.split(pout)
     path=tempt[0]
     #tv2b25ts(pout+".b25",ch,time)
-    b252tsmix(pout+".b25",path+"/"+t+"."+temp[1])
-    tsmix2ts(path+"/"+t+"."+temp[1],pout,csch)
+    b252tsmix(pout+".b25",path+"/"+t+ext)
+    tsmix2ts(path+"/"+t+ext,pout,csch)
     #os.remove(path+"/"+t+"."+temp[1])
     if os.access(pout, os.F_OK):
         try:
-            os.remove(path+"/"+t+"."+temp[1])
+            os.remove(path+"/"+t+ext)
         except:
             ""
 
index b2d139d..cebfb10 100644 (file)
@@ -113,11 +113,11 @@ def char_data(date):
     global flags,lastflag,xmldate
     #string=str(date)
     date=date.replace("\n","")
-    date=date.replace(" ","")
-    date=date.replace("(","[")
-    date=date.replace(")","]")
-    date=date.replace("(","[")
-    date=date.replace(")","]")
+    #date=date.replace(" ","")
+    #date=date.replace("(","[")
+    #date=date.replace(")","]")
+    #date=date.replace("(","[")
+    #date=date.replace(")","]")
     date=date.replace("\"","")
     date=date.replace("\'","")
     date=date.encode('utf-8')