1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 10:49:36 +02:00
Daniel Neto 2025-01-16 16:08:15 -03:00
parent 9b2b4fdf99
commit 86fc67fd64
2 changed files with 16 additions and 0 deletions

View file

@ -225,6 +225,16 @@ class CustomizeAdvanced extends PluginAbstract {
$obj->doNotShowEncoderAutomaticMP4 = false; $obj->doNotShowEncoderAutomaticMP4 = false;
$obj->doNotShowEncoderAutomaticWebm = false; $obj->doNotShowEncoderAutomaticWebm = false;
$obj->doNotShowEncoderAutomaticAudio = false; $obj->doNotShowEncoderAutomaticAudio = false;
$o = new stdClass();
$o->type = array(0 => __('Disabled'), 240 => __('Max 240p'), 360 => __('Max 360p'), 480 => __('Max 480p'), 540 => __('Max 540p'), 720 => __('Max 720p'), 1080 => __('Max 1080p'), 1440 => __('Max 1440p'), 2160 => __('Max 2160p'));
$o->value = 0;
$obj->singleResolution = $o;
self::addDataObjectHelper(
'singleResolution',
'Save MP4 videos in a single resolution',
'Select the maximum resolution to save each video. Videos will not be upscaled to higher resolutions (Must enable automatic resolutions)'
);
$obj->saveOriginalVideoResolution = false; $obj->saveOriginalVideoResolution = false;
self::addDataObjectHelper('saveOriginalVideoResolution', 'Save the original video resolution', 'This option will make your encoder at the end trancode the video into the original format resolution'); self::addDataObjectHelper('saveOriginalVideoResolution', 'Save the original video resolution', 'This option will make your encoder at the end trancode the video into the original format resolution');
$obj->doNotShowExtractAudio = false; $obj->doNotShowExtractAudio = false;

View file

@ -7,6 +7,12 @@ $obj = ObjectYPT::getCache($name, 60);
if(empty($obj)){ if(empty($obj)){
$obj = AVideoPlugin::getObjectData("CustomizeAdvanced"); $obj = AVideoPlugin::getObjectData("CustomizeAdvanced");
$objS = AVideoPlugin::getObjectData("Scheduler"); $objS = AVideoPlugin::getObjectData("Scheduler");
$objV = AVideoPlugin::getObjectDataIfEnabled("VideoHLS");
$obj->autoConvertToMp4 = false;
if(!empty($objV)){
$obj->autoConvertToMp4 = $objV->autoConvertToMp4;
}
$obj->disableReleaseDate = $objS->disableReleaseDate; $obj->disableReleaseDate = $objS->disableReleaseDate;