mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
This commit is contained in:
parent
c1104214d4
commit
1e63b3be72
4 changed files with 6 additions and 25 deletions
|
@ -4913,12 +4913,7 @@ if (!class_exists('Video')) {
|
||||||
return $_getPoster[$videos_id];
|
return $_getPoster[$videos_id];
|
||||||
}
|
}
|
||||||
$images = self::getImageFromID($videos_id);
|
$images = self::getImageFromID($videos_id);
|
||||||
$_getPoster[$videos_id] = false;
|
$_getPoster[$videos_id] = $images->default['url'];
|
||||||
if (!empty($images->poster)) {
|
|
||||||
$_getPoster[$videos_id] = $images->poster;
|
|
||||||
} elseif (!empty($images->posterPortrait)) {
|
|
||||||
$_getPoster[$videos_id] = $images->posterPortrait;
|
|
||||||
}
|
|
||||||
return $_getPoster[$videos_id];
|
return $_getPoster[$videos_id];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4926,13 +4921,7 @@ if (!class_exists('Video')) {
|
||||||
{
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$images = self::getImageFromID($videos_id);
|
$images = self::getImageFromID($videos_id);
|
||||||
$imagePath = $images->posterLandscapePath;
|
$imagePath = $images->default['path'];
|
||||||
if (empty($imagePath) || !file_exists($imagePath)) {
|
|
||||||
$imagePath = $images->posterLandscapeThumbs;
|
|
||||||
}
|
|
||||||
if (empty($imagePath) || !file_exists($imagePath)) {
|
|
||||||
$imagePath = $images->poster;
|
|
||||||
}
|
|
||||||
if (empty($imagePath) || empty(@filesize($imagePath))) {
|
if (empty($imagePath) || empty(@filesize($imagePath))) {
|
||||||
if (AVideoPlugin::isEnabledByName('MP4ThumbsAndGif')) {
|
if (AVideoPlugin::isEnabledByName('MP4ThumbsAndGif')) {
|
||||||
MP4ThumbsAndGif::getImageInDuration($videos_id, 'jpg');
|
MP4ThumbsAndGif::getImageInDuration($videos_id, 'jpg');
|
||||||
|
@ -4946,13 +4935,7 @@ if (!class_exists('Video')) {
|
||||||
{
|
{
|
||||||
global $global;
|
global $global;
|
||||||
$images = self::getImageFromID($videos_id);
|
$images = self::getImageFromID($videos_id);
|
||||||
$imagePath = $images->posterLandscapePath;
|
$imagePath = $images->default['path'];
|
||||||
if (empty($imagePath) || !file_exists($imagePath)) {
|
|
||||||
$imagePath = $images->posterLandscapeThumbs;
|
|
||||||
}
|
|
||||||
if (empty($imagePath) || !file_exists($imagePath)) {
|
|
||||||
$imagePath = $images->poster;
|
|
||||||
}
|
|
||||||
$rokuImage = str_replace(".jpg", "_roku.jpg", $imagePath);
|
$rokuImage = str_replace(".jpg", "_roku.jpg", $imagePath);
|
||||||
if (convertImageToRoku($imagePath, $rokuImage)) {
|
if (convertImageToRoku($imagePath, $rokuImage)) {
|
||||||
$relativePath = str_replace($global['systemRootPath'], '', $rokuImage);
|
$relativePath = str_replace($global['systemRootPath'], '', $rokuImage);
|
||||||
|
|
|
@ -109,9 +109,7 @@ class VastCampaignsVideos extends ObjectYPT
|
||||||
$row['link'] = Video::getLink($row['videos_id'], $row['clean_title']);
|
$row['link'] = Video::getLink($row['videos_id'], $row['clean_title']);
|
||||||
$rows[] = $row;
|
$rows[] = $row;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
|
||||||
}
|
|
||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -342,7 +342,7 @@ class API extends PluginAbstract
|
||||||
if (!empty($value['fullTotal_videos'])) {
|
if (!empty($value['fullTotal_videos'])) {
|
||||||
$video = Category::getLatestVideoFromCategory($value['id'], true, true);
|
$video = Category::getLatestVideoFromCategory($value['id'], true, true);
|
||||||
$images = Video::getImageFromID($video['id']);
|
$images = Video::getImageFromID($video['id']);
|
||||||
$image = $images->poster;
|
$image = $images->default['url'];
|
||||||
} elseif (!empty($value['fullTotal_lives'])) {
|
} elseif (!empty($value['fullTotal_lives'])) {
|
||||||
$live = Category::getLatestLiveFromCategory($value['id'], true, true);
|
$live = Category::getLatestLiveFromCategory($value['id'], true, true);
|
||||||
$image = Live::getImage($live['users_id'], $live['live_servers_id']);
|
$image = Live::getImage($live['users_id'], $live['live_servers_id']);
|
||||||
|
|
|
@ -99,7 +99,7 @@ if (!isset($global['systemRootPath'])) {
|
||||||
if (!empty($value['fullTotal_videos'])) {
|
if (!empty($value['fullTotal_videos'])) {
|
||||||
$video = Category::getLatestVideoFromCategory($value['id'], true, true);
|
$video = Category::getLatestVideoFromCategory($value['id'], true, true);
|
||||||
$images = Video::getImageFromID($video['id']);
|
$images = Video::getImageFromID($video['id']);
|
||||||
$image = $images->poster;
|
$image = $images->default['url'];
|
||||||
} elseif (!empty($value['fullTotal_lives'])) {
|
} elseif (!empty($value['fullTotal_lives'])) {
|
||||||
$live = Category::getLatestLiveFromCategory($value['id'], true, true);
|
$live = Category::getLatestLiveFromCategory($value['id'], true, true);
|
||||||
$image = Live::getImage($live['users_id'], $live['live_servers_id']);
|
$image = Live::getImage($live['users_id'], $live['live_servers_id']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue