hello I want to know you will change the site to not encode the same video twice? you can keep the md5 value of the video and compared and if the encoder was already one just puts a date in the database given in mp4
and add the code ligne 318//$db->query("UPDATE file SET fileHash='" . $fileHash . "' WHERE id=" . (int) $file['id'] . " LIMIT 1");
// check for pending conversions
$stmt = $db->query("SELECT fileHash, localFilePath, extension, fileType, fileSize FROM file WHERE fileHash='".$file['fileHash']."' and extension='mp4' ORDER BY fileHash ASC LIMIT 1");
$pendingRow1 = $stmt->fetch(PDO::FETCH_ASSOC);
if ($pendingRow1)
{
$myfff =$file['extension'];
$fileame =$file['originalFilename'];
$fileame = str_replace ('.'.$myfff.'', 'mp4', $fileame);
$taillefile = $pendingRow1['fileSize'];
$cheminfile = $pendingRow1['localFilePath'];
$typefile = $pendingRow1['fileType'];
$serverfile = $pendingRow1['serverId'];
$idfile =$file['id'];
// set to processing
$db->query("UPDATE file SET localFilePath='".$cheminfile."', originalFilename ='".$fileame."', fileSize='".$taillefile."', fileType= '".$typefile."', extension='mp4', serverId='".$serverfile."' WHERE id=" . $idfile . " LIMIT 1");
// update database to completed
$db->query("UPDATE plugin_mediaconverter_queue SET status='completed', date_started=NOW(), date_finished=NOW(), notes='deja encoder', serverid='5' WHERE id=" . $pendingRow['id'] . " LIMIT 1");
exit;
}