encode the same video twice

dfdssfsfd3806

Member
YetiShare User
Apr 4, 2014
271
0
16
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
 

dfdssfsfd3806

Member
YetiShare User
Apr 4, 2014
271
0
16
update in convert.php ligne 644
commente
//$db->query("UPDATE file SET fileHash='" . $fileHash . "' WHERE id=" . (int) $file['id'] . " LIMIT 1");
and add the code ligne 318
Code:
// 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;
}

is good no encoding 2 x video :)
 

dfdssfsfd3806

Member
YetiShare User
Apr 4, 2014
271
0
16
attention to me in the encoder I put an id to know which server encoded serverid add a field in the queu encodings