Add check on Video icon on video thumbnail

This commit is contained in:
Romain Neutron
2012-03-26 13:57:50 +02:00
parent 5478e668d8
commit 85f32e4e23

View File

@@ -87,9 +87,13 @@ class binaryAdapter_video_toimage_ffmpeg extends binaryAdapter_video_processorAb
if ($this->debug) if ($this->debug)
$this->log("Commande executee : $cmd \n"); $this->log("Commande executee : $cmd \n");
if (!file_exists($tmpFile)) if ( ! file_exists($tmpFile))
{
throw new Exception('Unable to extract image'); throw new Exception('Unable to extract image');
}
if (file_exists($this->registry->get('GV_RootPath') . 'www/skins/icons/play.png'))
{
$cmd = $this->registry->get('GV_pathcomposite') $cmd = $this->registry->get('GV_pathcomposite')
. ' -gravity SouthEast -quiet -compose over "' . ' -gravity SouthEast -quiet -compose over "'
. $this->registry->get('GV_RootPath') . 'www/skins/icons/play.png"' . $this->registry->get('GV_RootPath') . 'www/skins/icons/play.png"'
@@ -98,6 +102,12 @@ class binaryAdapter_video_toimage_ffmpeg extends binaryAdapter_video_processorAb
$this->shell_cmd($cmd); $this->shell_cmd($cmd);
unlink($tmpFile); unlink($tmpFile);
}
else
{
rename($tmpFile, $dest);
}
rmdir($tmpDir); rmdir($tmpDir);
return $this; return $this;