version bumps

This commit is contained in:
Shish 2023-05-25 12:57:21 +01:00
parent b5b7fe7d9e
commit 4ba3af7926
6 changed files with 284 additions and 293 deletions

465
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -251,9 +251,11 @@ class MimeType
$output = MimeType::PPM;
break;
// TODO: There is no uniquely defined Mime type for the cursor format. Need to figure this out.
// case FileExtension::CUR:
// $output = MimeType::CUR;
// break;
/*
case FileExtension::CUR:
$output = MimeType::CUR;
break;
*/
}
}
}

View file

@ -65,37 +65,37 @@ class TranscodeVideo extends Extension
$sb->end_table();
}
/*
public function onDataUpload(DataUploadEvent $event)
{
// global $config;
//
// if ($config->get_bool(TranscodeVideoConfig::UPLOAD) == true) {
// $ext = strtolower($event->type);
//
// $ext = Media::normalize_format($ext);
//
// if ($event->type=="gif"&&Media::is_animated_gif($event->tmpname)) {
// return;
// }
//
// if (in_array($ext, array_values(self::INPUT_FORMATS))) {
// $target_format = $config->get_string(TranscodeVideoConfig::UPLOAD_PREFIX.$ext);
// if (empty($target_format)) {
// return;
// }
// try {
// $new_image = $this->transcode_image($event->tmpname, $ext, $target_format);
// $event->set_tmpname($new_image, Media::determine_ext($target_format));
// } catch (Exception $e) {
// log_error("transcode_video", "Error while performing upload transcode: ".$e->getMessage());
// // We don't want to interfere with the upload process,
// // so if something goes wrong the untranscoded image jsut continues
// }
// }
// }
global $config;
if ($config->get_bool(TranscodeVideoConfig::UPLOAD) == true) {
$ext = strtolower($event->type);
$ext = Media::normalize_format($ext);
if ($event->type=="gif"&&Media::is_animated_gif($event->tmpname)) {
return;
}
if (in_array($ext, array_values(self::INPUT_FORMATS))) {
$target_format = $config->get_string(TranscodeVideoConfig::UPLOAD_PREFIX.$ext);
if (empty($target_format)) {
return;
}
try {
$new_image = $this->transcode_image($event->tmpname, $ext, $target_format);
$event->set_tmpname($new_image, Media::determine_ext($target_format));
} catch (Exception $e) {
log_error("transcode_video", "Error while performing upload transcode: ".$e->getMessage());
// We don't want to interfere with the upload process,
// so if something goes wrong the untranscoded image jsut continues
}
}
}
}
*/
public function onPageRequest(PageRequestEvent $event)
{