https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103353
Revision: 103353
Author: dale
Date: 2011-11-16 18:59:15 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
check for file before checking for file size
Modified Paths:
--------------
trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php
Modified:
trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php
===================================================================
---
trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php
2011-11-16 18:58:01 UTC (rev 103352)
+++
trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscodeJob.php
2011-11-16 18:59:15 UTC (rev 103353)
@@ -31,7 +31,7 @@
private function getTargetEncodePath(){
if( !$this->targetEncodePath ){
$file = wfLocalFile( $this->title );
- $transcodeKey = $this->params['transcodeKey'];
+ $transcodeKey = $this->params[ 'transcodeKey' ];
$this->targetEncodePath =
WebVideoTranscode::getTargetEncodePath( $file, $transcodeKey );
}
return $this->targetEncodePath;
@@ -496,9 +496,9 @@
// only run check if we are outputing to target
file
// ( two pass encoding does not output to
target on first pass )
clearstatcache();
- $newFileSize = filesize(
$this->getTargetEncodePath() );
+ $newFileSize = is_file(
$this->getTargetEncodePath() ) ? filesize( $this->getTargetEncodePath() ) : 0;
// Don't start checking for file growth until
we have an initial positive file size:
- if( is_file( $this->getTargetEncodePath() ) &&
$newFileSize > 0 ){
+ if( $newFileSize > 0 ){
$this->output( $wgLang->formatSize(
$newFileSize ). ' Total size, encoding ' .
$wgLang->formatSize( (
$newFileSize - $oldFileSize ) / 5 ) . ' per second' );
if( $newFileSize == $oldFileSize ){
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs