チェンジセット 97

差分発生行の前後
無視リスト:
コミット日時:
2010/04/02 22:58:58 (15 年前)
コミッタ:
sorshi
ログメッセージ:

radiko録音対応

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • trunk/install/perl/db/Pg.pl

    r94 r97  
    5454'recwrap.6' => "INSERT into foltia_mp4files VALUES (?, ?)", 
    5555'recwrap.7' => "SELECT foltia_subtitle.tid,foltia_subtitle.countno,foltia_subtitle.subtitle,foltia_subtitle.startdatetime ,foltia_subtitle.enddatetime ,foltia_subtitle.lengthmin ,foltia_tvrecord.bitrate , foltia_subtitle.startoffset , foltia_subtitle.pid ,foltia_tvrecord.digital FROM foltia_subtitle ,foltia_tvrecord WHERE foltia_tvrecord.tid = foltia_subtitle.tid AND foltia_tvrecord.tid = ? AND foltia_subtitle.startdatetime = ? AND foltia_tvrecord.digital = 1", 
     56'recwrap.8' => "SELECT stationid,stationname,stationrecch,tunertype FROM foltia_station WHERE stationid = ? ", 
    5657 
    5758'schedulecheck.1' => "SELECT count(*) FROM foltia_tvrecord", 
  • trunk/install/perl/deletemovie.pl

    r94 r97  
    3232 
    3333#ファイル名正当性チェック 
    34 if ($fname =~ /.m2p$|.m2t$/){ 
     34if ($fname =~ /.m2p$|.m2t$|.aac$/){ 
    3535 
    3636}else{ 
  • trunk/install/perl/ipodtranscode.pl

    r94 r97  
    134134} 
    135135 
    136  
    137136$filenamebody = $inputmpeg2 ; 
    138 $filenamebody =~ s/.m2t$|.ts$|.m2p$|.mpg$//gi; 
     137$filenamebody =~ s/.m2t$|.ts$|.m2p$|.mpg$|.aac$//gi; 
    139138 
    140139#デジタルかアナログか 
    141 if ($inputmpeg2 =~ /m2t$|ts$/i){ 
    142         #print "MPEG2-TS\n"; 
    143  
     140if ($inputmpeg2 =~ /m2t$|ts$|aac$/i){ 
    144141 
    145142if ($filestatus <= $FILESTATUSTRANSCODETSSPLITTING){ 
     
    237234} 
    238235if ($filestatus <= $FILESTATUSTRANSCODEMP4BOX){ 
     236 
     237unlink("${filenamebody}.base.mp4"); 
     238 
     239#デジタルラジオなら 
     240if ($inputmpeg2 =~ /aac$/i){ 
     241        if (-e "$toolpath/perl/tool/MP4Box"){ 
     242                &writelog("ipodtranscode MP4Box $filenamebody"); 
     243                system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -add $filenamebody.aac  -new $filenamebody.base.mp4"); 
     244        $exit_value = $? >> 8; 
     245        $signal_num = $? & 127; 
     246        $dumped_core = $? & 128; 
     247        &writelog("ipodtranscode DEBUG MP4Box -add $filenamebody.aac  -new $filenamebody.base.mp4:$exit_value:$signal_num:$dumped_core"); 
     248        }else{ 
     249                &writelog("ipodtranscode WARN; Pls. install $toolpath/perl/tool/MP4Box"); 
     250        } 
     251}else{ 
    239252        # MP4ビルド 
    240         unlink("${filenamebody}.base.mp4"); 
    241253        if (-e "$toolpath/perl/tool/MP4Box"){ 
    242254                &changefilestatus($pid,$FILESTATUSTRANSCODEMP4BOX); 
    243255                &writelog("ipodtranscode MP4Box $filenamebody"); 
    244 #                       system ("cd $recfolderpath ; MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4"); 
    245                         system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4"); 
     256                system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4"); 
    246257        $exit_value = $? >> 8; 
    247258        $signal_num = $? & 127; 
    248259        $dumped_core = $? & 128; 
    249260        &writelog("ipodtranscode DEBUG MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4:$exit_value:$signal_num:$dumped_core"); 
    250  
    251          
    252261                if (-e "$filenamebody.base.mp4"){ 
    253 #               system ("cd $recfolderpath ; MP4Box -add $filenamebody.aac $filenamebody.base.mp4"); 
    254262                system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -add $filenamebody.aac $filenamebody.base.mp4"); 
    255263        $exit_value = $? >> 8; 
     
    265273                &writelog("ipodtranscode WARN; Pls. install $toolpath/perl/tool/MP4Box"); 
    266274        } 
     275unlink("$filenamebody.aac"); 
     276}#endif #デジタルラジオなら 
     277         
    267278#} 
    268279 
     
    299310        unlink("$filenamebody.264"); 
    300311        unlink("$filenamebody.wav"); 
    301         unlink("$filenamebody.aac"); 
    302312        unlink("$filenamebody.base.mp4"); 
    303313         
  • trunk/install/perl/recwrap.pl

    r94 r97  
    5454}else{ 
    5555        $extension = ".m2p";#MPEG2の拡張子 
     56} 
     57if ($recch == -2 ){ #ラジオ局 
     58        $extension = ".aac";#MPEG2の拡張子 
    5659} 
    5760 
     
    7174        } 
    7275} 
     76 
     77if ($recch == -2 ){ #ラジオ局 
     78# stationIDからradiko識別子を取得 
     79$sth = $dbh->prepare($stmt{'recwrap.8'}); 
     80$sth->execute($stationid); 
     81 @stationline= $sth->fetchrow_array; 
     82$radikostationname = $stationline[3]; 
     83 
     84$oserr = system("$toolpath/perl/digitalradiorecording.pl $radikostationname $reclength $outputfilename"); 
     85$oserr = $oserr / 256; 
     86&writelog("recwrap DEBUG radiko rec finished. $oserr"); 
     87 
     88# aacファイル名をfoltia_subtitlePIDレコードに書き込み 
     89$sth = $dbh->prepare($stmt{'recwrap.1'}); 
     90$sth->execute($outputfilename, $pid); 
     91&writelog("recwrap DEBUG UPDATEDB $stmt{'recwrap.1'}"); 
     92&changefilestatus($pid,$FILESTATUSTRANSCODEMP4BOX); 
     93 
     94# aacファイル名をfoltia_m2pfilesPIDレコードに書き込み 
     95$sth = $dbh->prepare($stmt{'recwrap.2'}); 
     96$sth->execute($outputfilename); 
     97&writelog("recwrap DEBUG UPDATEDB $stmt{'recwrap.2'}"); 
     98 
     99 
     100}else{#非ラジオ局なら 
    73101 
    74102if ($usedigital == 1){ 
     
    96124exit ; 
    97125} 
    98 }else{ 
     126}else{ # NOT $usedigital == 1 
    99127#リモコン操作 
    100128# $haveirdaunit = 1;リモコンつないでるかどうか確認 
     
    176204&changefilestatus($pid,$FILESTATUSCAPEND); 
    177205} 
    178  
     206}#非ラジオ局 
    179207 
    180208# MPEG4 ------------------------------------------------------ 
     
    184212 @psptrcn= $sth->fetchrow_array; 
    185213if ($psptrcn[0]  == 1 ){#トラコン番組 
    186 &writelog("recwrap Launch ipodtranscode.pl"); 
    187 exec ("$toolpath/perl/ipodtranscode.pl"); 
    188 exit; 
     214       &writelog("recwrap Launch ipodtranscode.pl"); 
     215       exec ("$toolpath/perl/ipodtranscode.pl"); 
     216       exit; 
    189217}#PSPトラコンあり 
    190218 
  • trunk/install/perl/updatem2pfiletable.pl

    r94 r97  
    3131$sth = $dbh->prepare($stmt{'updatem2pfiletable.1'}); 
    3232        $sth->execute(); 
    33  
    3433while ($file = glob("$recfolderpath/*.m2?")) { 
    3534$file =~ s/$recfolderpath\///; 
     
    3837# print "$file\n"; 
    3938}#while 
     39while ($file = glob("$recfolderpath/*.aac")) { 
     40$file =~ s/$recfolderpath\///; 
     41    $sth = $dbh->prepare($stmt{'updatem2pfiletable.2'}); 
     42    $sth->execute($file); 
     43# print "$file\n"; 
     44}#while 
     45 
    4046$oserr = $dbh->commit; 
    4147 
  • trunk/install/php/deletemovie.php

    r94 r97  
    8282                $filesplit = split("-",$fName); 
    8383         
     84/* 
    8485if ($filesplit[1] == ""){ 
    8586$query = " 
     
    9091 AND foltia_subtitle.tid = ?  
    9192"; 
    92 //$rs = m_query($con, $query, "DBクエリに失敗しました"); 
    9393$rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0])); 
    9494                                $rall = $rs->fetchAll(); 
    95                                 $rowdata = $rall[$row]; 
    96 //print" $fName./$rowdata[1]//$rowdata[2]<BR>\n"
     95                                //$rowdata = $rall[$row]; 
     96                               $rowdata = $rall[0]
    9797$title = $rowdata[1]; 
    9898$subtitle = ""; 
    9999$count = ""; 
    100 }else{ 
     100*/ 
     101//}else{ 
    101102 
    102103$query = " 
    103 SELECT  
    104 foltia_program.tid,foltia_program.title,foltia_subtitle.countno,foltia_subtitle.subtitle   
    105 FROM foltia_subtitle , foltia_program    
    106 WHERE foltia_program.tid = foltia_subtitle.tid   
    107  AND foltia_subtitle.tid = ?  
    108  AND foltia_subtitle.countno = ?  
     104SELECT foltia_program.tid,foltia_program.title,foltia_subtitle.countno,foltia_subtitle.subtitle  
     105FROM foltia_subtitle , foltia_program  
     106WHERE foltia_program.tid = foltia_subtitle.tid  
     107AND foltia_subtitle.m2pfilename =  ?  
    109108"; 
     109 
    110110//$rs = m_query($con, $query, "DBクエリに失敗しました"); 
    111 $rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0] ,$filesplit[1])); 
     111//$rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0] ,$filesplit[1])); 
     112$rs = sql_query($con, $query, "DBクエリに失敗しました",array($fName)); 
    112113                                $rall = $rs->fetchAll(); 
    113                                 $rowdata = $rall[$row]; 
     114                                //$rowdata = $rall[$row]; 
     115                                $rowdata = $rall[0]; 
    114116//print" $fName./$rowdata[1]/$rowdata[2]/$rowdata[3]<BR>\n"; 
    115117$title = $rowdata[1]; 
     
    117119$subtitle = $rowdata[3]; 
    118120 
    119 }//end if 話数がNULL 
     121//}//end if 話数がNULL 
    120122 
    121123$tid = htmlspecialchars($rowdata[0]); 
     
    127129<tr> 
    128130<td>$fName<br></td> 
    129 <td><a href=\"http://cal.syoboi.jp/tid/$tid\" target=\"_blank\">$title</a></td> 
     131<td>"; 
     132 
     133if ($tid > 0 ){ 
     134        print "<a href=\"http://cal.syoboi.jp/tid/$tid\" target=\"_blank\">$title</a>"; 
     135}else{ 
     136        print "$title"; 
     137
     138 
     139print "</td> 
    130140<td>$count<br></td> 
    131141<td>$subtitle<br></td> 
  • trunk/install/php/m.php

    r94 r97  
    239239FROM  foltia_station  
    240240WHERE digitalch > 0  
     241UNION 
     242SELECT DISTINCT  stationid,stationname,stationrecch ,digitalch  
     243FROM  foltia_station  
     244WHERE stationrecch = -2  
    241245ORDER BY x ASC"; 
    242246 
     
    248252                        if ($recstid == $rowdata[0]){ 
    249253                        print " <input name=\"recstid\" type=\"radio\" value=\"$rowdata[0]\" checked />  $rowdata[1] ($rowdata[2]ch / $rowdata[3]ch) \n"; 
     254                        }elseif( $rowdata[2] == -2){ 
     255                        print " <input name=\"recstid\" type=\"radio\" value=\"$rowdata[0]\" checked />  $rowdata[1] (<!-- $rowdata[2]ch / $rowdata[3]ch -->RADIKO) \n"; 
    250256                        }else{ 
    251257                                print " <input name=\"recstid\" type=\"radio\" value=\"$rowdata[0]\" />  $rowdata[1] ($rowdata[2]ch / $rowdata[3]ch) \n"; 
track feed