OSDN Git Service

fix rename error.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sat, 4 Dec 2010 14:55:13 +0000 (14:55 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Sat, 4 Dec 2010 14:55:13 +0000 (14:55 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@789 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/dbMySQL.py
rec10/trunk/src/ts2x264.py
rec10/trunk/src/tv2mp4.py

index c56155e..6f74f6f 100644 (file)
@@ -1190,9 +1190,11 @@ class DB_MySQL:
         self.drop_in_settings()
         self.new_in_settings()
         db[1].execute("\
-        UPDATE timeline INNER JOIN epg_ch ON timeline.chtxt=epg_ch.chtxt SET timeline.chtxt=CONCAT(CONCAT(epg_ch.ch,'_'),epg_ch.csch)")
+        UPDATE timeline INNER JOIN epg_ch ON timeline.chtxt=epg_ch.chtxt SET timeline.chtxt=CONCAT(CONCAT(epg_ch.ch,'_'),epg_ch.csch) WHERE NOT (substring(epg_ch.bctype,1,2) = 'bs' OR substring(epg_ch.bctype,1,2) = 'cs')")
         db[1].execute("\
-        UPDATE timeline INNER JOIN epg_ch ON timeline.chtxt=epg_ch.chtxt SET timeline.chtxt=CONCAT('CS_',epg_ch.csch) WHERE timeline.chtxt LIKE 'CS%'")
+        UPDATE timeline INNER JOIN epg_ch ON timeline.chtxt=epg_ch.chtxt SET timeline.chtxt=CONCAT('BS_',epg_ch.ch) WHERE substring(epg_ch.bctype,1,2) = 'bs'")
+        db[1].execute("\
+        UPDATE timeline INNER JOIN epg_ch ON timeline.chtxt=epg_ch.chtxt SET timeline.chtxt=CONCAT('CS_',epg_ch.csch) WHERE substring(epg_ch.bctype,1,2) = 'cs'")
         db[1].execute("\
         ALTER TABLE epg_ch DROP ontv")
         db[1].execute("\
index d89bfc8..2a72db9 100644 (file)
@@ -71,9 +71,9 @@ def ts2x264(pin, pout, opts):#sizeは"HD"か"SD"
         try:\r
             encodeMencoderSar(pin, pout,size,is24fps,quality,crf,deinterlace)\r
         except Exception, inst:\r
-            recdblist.Commonlogex("Error", "ts2x264(ts2x264.py)", str(type(inst)), str(inst)+traceback.format_exc(),log_level=200)\r
+            recdblist.addCommonlogEX("Error", "ts2x264(ts2x264.py)", str(type(inst)), str(inst)+traceback.format_exc(),log_level=200)\r
 def encodeMencoderSar(pin,pout,size,is24fps,quality,crf,deinterlace=1):\r
-    mencoder=configreader.getpath("mencoder")\r
+    mencoder=configreader.getConfPath("mencoder")\r
     encvf=""\r
     txt=""\r
     encvf="-sws 9 -vf yadif=0,pp=l5"\r
@@ -470,7 +470,7 @@ def getX264Commandline(preset,sar,fps,x264profile,x264tune,pout,pin,x264streamsi
     except:\r
         x264_thread="auto"\r
     x264_addline=configreader.getConfEnv("x264_addline")\r
-    if get_x264core_version()>103:\r
+    if getX264CoreVersion()>103:\r
         x264res=u"--input-res "+x264streamsize\r
         exe=u"nice -n 19 "+x264+" "+x264_sar+" "+x264crf+u" "+x264_addline+u" --colormatrix bt709 --threads "+x264_thread+" "+x264profile+x264preset+" "+x264tune+" "+x264fps+" "+x264res+" -o \""+pout+"\" "+pin\r
     else:\r
index f83f224..3585202 100644 (file)
@@ -59,8 +59,8 @@ def raw2mp4(pin,pout,opt):
     execmp4box(pin, pout, e1)\r
     addAudio(pints, pout, opt)\r
     addCaption(pints, pout)\r
-    #recdblist.addlog(pout, txt, "mp4boxログ-コマンド")\r
-    #recdblist.addlog(pout, txt, "mp4boxログ-詳細")\r
+    #recdblist.addLog(pout, txt, "mp4boxログ-コマンド")\r
+    #recdblist.addLog(pout, txt, "mp4boxログ-詳細")\r
     if status.getSettings_auto_del_tmp()==1:\r
         if os.path.exists(pout):\r
             if re.search(opt,"1") or re.search(opt,"2"):\r
@@ -70,7 +70,7 @@ def raw2mp4(pin,pout,opt):
 def mkv2mp4(pin,pout):\r
     exeb = configreader.getConfPath(u"mkvextract")\r
     exe = configreader.getConfPath(u"mp4Box")\r
-    #dtsedit=configreader.getpath("DtsEdit")\r
+    #dtsedit=configreader.getConfPath("DtsEdit")\r
     wineexe=configreader.getConfPath("wine")\r
     dir=os.path.split(pin)[0]\r
     title=os.path.split(pin)[1]\r
@@ -93,7 +93,7 @@ def mkv2mp4(pin,pout):
         txt=txt+execcomd(exe3)+"\n"\r
     except:\r
         ""\r
-    recdblist.addlog(pin, txt, u"MKV2MP4-log")\r
+    recdblist.addLog(pin, txt, u"MKV2MP4-log")\r
     txt = "\n####MKV2MP4-log####\n"+txt\r
     time.sleep(10)\r
     if status.getSettings_auto_del_tmp()==1:\r
@@ -117,8 +117,8 @@ def addCaption(pts,pmp4):##字幕の追加を試みる。
             #else:\r
             os.waitpid(p0.pid, 0)\r
             logt=unicode(p0.communicate()[0], "UTF-8")\r
-            recdblist.addlog(pts,e0, u"Captionログ-コマンド")\r
-            recdblist.addlog(pts,logt, u"Captionログ-詳細")\r
+            recdblist.addLog(pts,e0, u"Captionログ-コマンド")\r
+            recdblist.addLog(pts,logt, u"Captionログ-詳細")\r
         if os.path.exists(pincap):\r
             if os.path.getsize(pincap)>1000:\r
                 exe = configreader.getConfPath("mp4box")\r
@@ -168,9 +168,9 @@ def execmp4box(pin,pout,cmd):
         txt= "error occures in execmp4box\n"\r
         txt=txt+ str(type(inst))+"\n"\r
         txt=txt+str(inst)\r
-        recdblist.Commonlogex("Error", "excecmp4box(tv2mp4.py)", str(type(inst)), str(inst)+traceback.format_exc(),verbose_level=200,log_level=200)\r
-    recdblist.addlog(pin, cmdn, u"MP4Boxログ-コマンド")\r
-    recdblist.addlog(pin, txt, u"MP4Boxログ-詳細")\r
+        recdblist.addCommonlogEX("Error", "excecmp4box(tv2mp4.py)", str(type(inst)), str(inst)+traceback.format_exc(),verbose_level=200,log_level=200)\r
+    recdblist.addLog(pin, cmdn, u"MP4Boxログ-コマンド")\r
+    recdblist.addLog(pin, txt, u"MP4Boxログ-詳細")\r
     time.sleep(5)\r
     shutil.move(ptin,pin)\r
     shutil.move(ptout,pout)\r
@@ -200,8 +200,8 @@ def addmp4(padd,pout,cmd):#without video
         txt= "error occures in addmp4\n"\r
         txt=txt+ str(type(inst))+"\n"\r
         txt=txt+str(inst)\r
-    recdblist.addlog(pout, cmdn, u"MP4Box追加ログ-コマンド")\r
-    recdblist.addlog(pout, txt, u"MP4Box追加ログ-詳細")\r
+    recdblist.addLog(pout, cmdn, u"MP4Box追加ログ-コマンド")\r
+    recdblist.addLog(pout, txt, u"MP4Box追加ログ-詳細")\r
     time.sleep(5)\r
     shutil.move(ptadd,padd)\r
     if os.path.exists(ptout):\r
@@ -209,7 +209,7 @@ def addmp4(padd,pout,cmd):#without video
         os.remove(ptoutb)\r
     else:\r
         txtt=padd+u"のインポートエラー"\r
-        recdblist.addlog(pout, txtt, u"MP4Box追加ログ-コマンド")\r
+        recdblist.addLog(pout, txtt, u"MP4Box追加ログ-コマンド")\r
         shutil.move(ptoutb,pout)\r
     time.sleep(5)\r
 def execcomd(cmd):\r