Index: /trunk/install/perl/updatem2pfiletable.pl =================================================================== --- /trunk/install/perl/updatem2pfiletable.pl (リビジョン 94) +++ /trunk/install/perl/updatem2pfiletable.pl (リビジョン 97) @@ -31,5 +31,4 @@ $sth = $dbh->prepare($stmt{'updatem2pfiletable.1'}); $sth->execute(); - while ($file = glob("$recfolderpath/*.m2?")) { $file =~ s/$recfolderpath\///; @@ -38,4 +37,11 @@ # print "$file\n"; }#while +while ($file = glob("$recfolderpath/*.aac")) { +$file =~ s/$recfolderpath\///; + $sth = $dbh->prepare($stmt{'updatem2pfiletable.2'}); + $sth->execute($file); +# print "$file\n"; +}#while + $oserr = $dbh->commit; Index: /trunk/install/perl/db/Pg.pl =================================================================== --- /trunk/install/perl/db/Pg.pl (リビジョン 94) +++ /trunk/install/perl/db/Pg.pl (リビジョン 97) @@ -54,4 +54,5 @@ 'recwrap.6' => "INSERT into foltia_mp4files VALUES (?, ?)", '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", +'recwrap.8' => "SELECT stationid,stationname,stationrecch,tunertype FROM foltia_station WHERE stationid = ? ", 'schedulecheck.1' => "SELECT count(*) FROM foltia_tvrecord", Index: /trunk/install/perl/ipodtranscode.pl =================================================================== --- /trunk/install/perl/ipodtranscode.pl (リビジョン 94) +++ /trunk/install/perl/ipodtranscode.pl (リビジョン 97) @@ -134,12 +134,9 @@ } - $filenamebody = $inputmpeg2 ; -$filenamebody =~ s/.m2t$|.ts$|.m2p$|.mpg$//gi; +$filenamebody =~ s/.m2t$|.ts$|.m2p$|.mpg$|.aac$//gi; #デジタルかアナログか -if ($inputmpeg2 =~ /m2t$|ts$/i){ - #print "MPEG2-TS\n"; - +if ($inputmpeg2 =~ /m2t$|ts$|aac$/i){ if ($filestatus <= $FILESTATUSTRANSCODETSSPLITTING){ @@ -237,19 +234,30 @@ } if ($filestatus <= $FILESTATUSTRANSCODEMP4BOX){ + +unlink("${filenamebody}.base.mp4"); + +#デジタルラジオなら +if ($inputmpeg2 =~ /aac$/i){ + if (-e "$toolpath/perl/tool/MP4Box"){ + &writelog("ipodtranscode MP4Box $filenamebody"); + system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -add $filenamebody.aac -new $filenamebody.base.mp4"); + $exit_value = $? >> 8; + $signal_num = $? & 127; + $dumped_core = $? & 128; + &writelog("ipodtranscode DEBUG MP4Box -add $filenamebody.aac -new $filenamebody.base.mp4:$exit_value:$signal_num:$dumped_core"); + }else{ + &writelog("ipodtranscode WARN; Pls. install $toolpath/perl/tool/MP4Box"); + } +}else{ # MP4ビルド - unlink("${filenamebody}.base.mp4"); if (-e "$toolpath/perl/tool/MP4Box"){ &changefilestatus($pid,$FILESTATUSTRANSCODEMP4BOX); &writelog("ipodtranscode MP4Box $filenamebody"); -# system ("cd $recfolderpath ; MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4"); - system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4"); + system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4"); $exit_value = $? >> 8; $signal_num = $? & 127; $dumped_core = $? & 128; &writelog("ipodtranscode DEBUG MP4Box -fps 29.97 -add $filenamebody.264 -new $filenamebody.base.mp4:$exit_value:$signal_num:$dumped_core"); - - if (-e "$filenamebody.base.mp4"){ -# system ("cd $recfolderpath ; MP4Box -add $filenamebody.aac $filenamebody.base.mp4"); system ("cd $recfolderpath ;$toolpath/perl/tool/MP4Box -add $filenamebody.aac $filenamebody.base.mp4"); $exit_value = $? >> 8; @@ -265,4 +273,7 @@ &writelog("ipodtranscode WARN; Pls. install $toolpath/perl/tool/MP4Box"); } +unlink("$filenamebody.aac"); +}#endif #デジタルラジオなら + #} @@ -299,5 +310,4 @@ unlink("$filenamebody.264"); unlink("$filenamebody.wav"); - unlink("$filenamebody.aac"); unlink("$filenamebody.base.mp4"); Index: /trunk/install/perl/deletemovie.pl =================================================================== --- /trunk/install/perl/deletemovie.pl (リビジョン 94) +++ /trunk/install/perl/deletemovie.pl (リビジョン 97) @@ -32,5 +32,5 @@ #ファイル名正当性チェック -if ($fname =~ /.m2p$|.m2t$/){ +if ($fname =~ /.m2p$|.m2t$|.aac$/){ }else{ Index: /trunk/install/perl/recwrap.pl =================================================================== --- /trunk/install/perl/recwrap.pl (リビジョン 94) +++ /trunk/install/perl/recwrap.pl (リビジョン 97) @@ -54,4 +54,7 @@ }else{ $extension = ".m2p";#MPEG2の拡張子 +} +if ($recch == -2 ){ #ラジオ局 + $extension = ".aac";#MPEG2の拡張子 } @@ -71,4 +74,29 @@ } } + +if ($recch == -2 ){ #ラジオ局 +# stationIDからradiko識別子を取得 +$sth = $dbh->prepare($stmt{'recwrap.8'}); +$sth->execute($stationid); + @stationline= $sth->fetchrow_array; +$radikostationname = $stationline[3]; + +$oserr = system("$toolpath/perl/digitalradiorecording.pl $radikostationname $reclength $outputfilename"); +$oserr = $oserr / 256; +&writelog("recwrap DEBUG radiko rec finished. $oserr"); + +# aacファイル名をfoltia_subtitlePIDレコードに書き込み +$sth = $dbh->prepare($stmt{'recwrap.1'}); +$sth->execute($outputfilename, $pid); +&writelog("recwrap DEBUG UPDATEDB $stmt{'recwrap.1'}"); +&changefilestatus($pid,$FILESTATUSTRANSCODEMP4BOX); + +# aacファイル名をfoltia_m2pfilesPIDレコードに書き込み +$sth = $dbh->prepare($stmt{'recwrap.2'}); +$sth->execute($outputfilename); +&writelog("recwrap DEBUG UPDATEDB $stmt{'recwrap.2'}"); + + +}else{#非ラジオ局なら if ($usedigital == 1){ @@ -96,5 +124,5 @@ exit ; } -}else{ +}else{ # NOT $usedigital == 1 #リモコン操作 # $haveirdaunit = 1;リモコンつないでるかどうか確認 @@ -176,5 +204,5 @@ &changefilestatus($pid,$FILESTATUSCAPEND); } - +}#非ラジオ局 # MPEG4 ------------------------------------------------------ @@ -184,7 +212,7 @@ @psptrcn= $sth->fetchrow_array; if ($psptrcn[0] == 1 ){#トラコン番組 -&writelog("recwrap Launch ipodtranscode.pl"); -exec ("$toolpath/perl/ipodtranscode.pl"); -exit; + &writelog("recwrap Launch ipodtranscode.pl"); + exec ("$toolpath/perl/ipodtranscode.pl"); + exit; }#PSPトラコンあり Index: /trunk/install/php/m.php =================================================================== --- /trunk/install/php/m.php (リビジョン 94) +++ /trunk/install/php/m.php (リビジョン 97) @@ -239,4 +239,8 @@ FROM foltia_station WHERE digitalch > 0 +UNION +SELECT DISTINCT stationid,stationname,stationrecch ,digitalch +FROM foltia_station +WHERE stationrecch = -2 ORDER BY x ASC"; @@ -248,4 +252,6 @@ if ($recstid == $rowdata[0]){ print " $rowdata[1] ($rowdata[2]ch / $rowdata[3]ch) \n"; + }elseif( $rowdata[2] == -2){ + print " $rowdata[1] (RADIKO) \n"; }else{ print " $rowdata[1] ($rowdata[2]ch / $rowdata[3]ch) \n"; Index: /trunk/install/php/deletemovie.php =================================================================== --- /trunk/install/php/deletemovie.php (リビジョン 94) +++ /trunk/install/php/deletemovie.php (リビジョン 97) @@ -82,4 +82,5 @@ $filesplit = split("-",$fName); +/* if ($filesplit[1] == ""){ $query = " @@ -90,26 +91,27 @@ AND foltia_subtitle.tid = ? "; -//$rs = m_query($con, $query, "DBクエリに失敗しました"); $rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0])); $rall = $rs->fetchAll(); - $rowdata = $rall[$row]; -//print" $fName./$rowdata[1]//$rowdata[2]
\n"; + //$rowdata = $rall[$row]; + $rowdata = $rall[0]; $title = $rowdata[1]; $subtitle = ""; $count = ""; -}else{ +*/ +//}else{ $query = " -SELECT -foltia_program.tid,foltia_program.title,foltia_subtitle.countno,foltia_subtitle.subtitle -FROM foltia_subtitle , foltia_program -WHERE foltia_program.tid = foltia_subtitle.tid - AND foltia_subtitle.tid = ? - AND foltia_subtitle.countno = ? +SELECT foltia_program.tid,foltia_program.title,foltia_subtitle.countno,foltia_subtitle.subtitle +FROM foltia_subtitle , foltia_program +WHERE foltia_program.tid = foltia_subtitle.tid +AND foltia_subtitle.m2pfilename = ? "; + //$rs = m_query($con, $query, "DBクエリに失敗しました"); -$rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0] ,$filesplit[1])); +//$rs = sql_query($con, $query, "DBクエリに失敗しました",array($filesplit[0] ,$filesplit[1])); +$rs = sql_query($con, $query, "DBクエリに失敗しました",array($fName)); $rall = $rs->fetchAll(); - $rowdata = $rall[$row]; + //$rowdata = $rall[$row]; + $rowdata = $rall[0]; //print" $fName./$rowdata[1]/$rowdata[2]/$rowdata[3]
\n"; $title = $rowdata[1]; @@ -117,5 +119,5 @@ $subtitle = $rowdata[3]; -}//end if 話数がNULL +//}//end if 話数がNULL $tid = htmlspecialchars($rowdata[0]); @@ -127,5 +129,13 @@ $fName
-$title +"; + +if ($tid > 0 ){ + print "$title"; +}else{ + print "$title"; +} + +print " $count
$subtitle