OSDN Git Service

update epg only when recording task is less than 2.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sun, 26 Jul 2009 11:46:51 +0000 (11:46 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sun, 26 Jul 2009 11:46:51 +0000 (11:46 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@79 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/epgdb.py
rec10/trunk/src/readme.txt
rec10/trunk/src/status.py
rec10/trunk/src/timerec.py
rec10/trunk/src/tv2ts.py

index 6185824..4aa55a1 100644 (file)
@@ -27,8 +27,14 @@ def update(chtxt):
 def updatebc(bctype):
     bctypel=chdb.bctypesearch(bctype)
     print bctypel
-    ts2epg.write(tmppath+"epgdate.xml",chdb.bctypesearch(bctype)['ch'])
-    xml2db.xml2db(tmppath+"epgdate.xml",path+"ch.db",bctype)
+    i=1
+    while i<5:
+        try:
+            ts2epg.write(tmppath+"epgdate.xml",chdb.bctypesearch(bctype)['ch'])
+            xml2db.xml2db(tmppath+"epgdate.xml",path+"ch.db",bctype)
+            break
+        except:
+            i=i+1
 def updateall():
     update("hisch")
     update("nhk-k")
index 9d86407..6f27c90 100644 (file)
@@ -1,7 +1,7 @@
 ###########################################
 #     Rec10 for PT1                  #
-#                     Ver.0.4.1a     #
-# 2009/05/09    Yukikaze                 #
+#                     Ver.0.5.0a     #
+# 2009/08/01    Yukikaze                 #
 #  Copyright (C) 2009 Yukikaze   #
 ###########################################
 
@@ -12,7 +12,7 @@
 python(2.5にて動作確認)
 xvfb-run
 wine
-mencoder
+mencoder(h.264サポートのもの)
 ffmpeg
 
 [必要環境:Webインターフェース部分]
@@ -22,9 +22,9 @@ perl
 [必要環境:外部ツール]
 TsSplitter
 BonTsDemux
-tsEpg2xml
+epgdump
 b25
-recpt1(recfriio)
+recpt1(recfriioでもいいはずです)
 
 以上のソフトについては実行パスをconfig.iniに書いておいてください
 その後chdate.pyのチャンネル設定部分を書き換え、chdate.pyを実行してください
@@ -51,6 +51,11 @@ dbviewer.pyを実行すると現在のデーターベースを見ることがで
 yukikaze.jp@gmail.com
 
 [History]
+09/08/01 0.5.0 release
+バグフィックス
+検索録画のパターンマッチングアルゴリズムの変更(推測的な検索ができるようになった)
+rectool.plを同梱するようにした。
+
 09/07/01 0.4.1 release
 lots of bug fixes
 add some cs-ch.
index bc618f5..2d17767 100755 (executable)
@@ -7,6 +7,9 @@ import re
 path=os.path.dirname(os.path.abspath(__file__))+"/"
 
 def getEncoding():
+    """
+    エンコードしている数を帰すint型
+    """
     f = open(path+'status')
     lines = f.readlines() # 1行毎にファイル終端まで全て読む(改行文字も含まれる)
     f.close()
index 90e62c1..64ed3c3 100644 (file)
@@ -24,10 +24,10 @@ def task():
     """
     recdb.delete_old("6")
     tasks=recdb.getnow("1")
-    inum=recdb.countRecNow("1")
+    inum=recdb.countRecNow("2")
     print "now-rectask"
     print inum
-    if inum < 2:#1個ならTE|BS/CSのどちらかが埋まってる可能性はないので1以下にした。
+    if ( inum < 2 ) and ( status.getBSCSRecording()+status.getTERecording() < 2 ):#1個ならTE|BS/CSのどちらかが埋まってる可能性はないので1以下にした。
         update=chdb.update()
         #print "番組表更新処理"
         print update
index 4ccf620..6c0ea62 100644 (file)
@@ -12,11 +12,21 @@ import base64
 #import glob
 import time
 import hashlib
+import status
 #japanesenkf.overrideEncodings()
 
 mypath=str(os.path.dirname(os.path.abspath(__file__)))+"/"
 def tv2tsmix(pout,ch,time):
+    if len(ch)>2:#BS/CSは100とかCS??とかなので3文字以上
+        status.setBSCSRecording(status.getBSCSRecording()+1)
+    else:
+        status.setTERecording(status.getTERecording()+1)
     tv2b25ts(pout+".b25",ch,time)
+    if len(ch)>2:#BS/CSは100とかCS??とかなので3文字以上
+        status.setBSCSRecording(status.getBSCSRecording()-1)
+    else:
+        status.setTERecording(status.getTERecording()-1)
+    
     b252tsmix(pout+".b25",pout)
     #os.remove(pout+".b25")
     if os.access(pout, os.F_OK):
@@ -41,7 +51,15 @@ def tv2ts(pout,ch,csch,time):
     #t=str(random.randint(10000,90000))
     tempt=os.path.split(pout)
     path=tempt[0]
+    if len(ch)>2:#BS/CSは100とかCS??とかなので3文字以上
+        status.setBSCSRecording(status.getBSCSRecording()+1)
+    else:
+        status.setTERecording(status.getTERecording()+1)
     tv2b25ts(pout+".b25",ch,time)
+    if len(ch)>2:#BS/CSは100とかCS??とかなので3文字以上
+        status.setBSCSRecording(status.getBSCSRecording()-1)
+    else:
+        status.setTERecording(status.getTERecording()-1)
     b252tsmix(pout+".b25",path+"/"+t+ext)
     tsmix2ts(path+"/"+t+ext,pout,csch)
     #os.remove(path+"/"+t+"."+temp[1])