mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
parent
813ad3f497
commit
a95c8b1bbb
6 changed files with 19 additions and 11 deletions
|
@ -158,6 +158,9 @@ Options All -Indexes
|
|||
|
||||
RewriteRule ^tag/([0-9-]+)(.*)?$ view/?tags_id=$1 [NC,L,QSA]
|
||||
|
||||
RewriteRule ^video/([0-9]+)/?$ view/modeYoutube.php?videos_id=$1 [QSA]
|
||||
RewriteRule ^video/([0-9]+)/poster.png$ view/videoGetPoster.php?videos_id=$1 [QSA]
|
||||
|
||||
#Video ID routes
|
||||
RewriteRule ^v/(.[0-9a-zA-Z_.-]+)/([^!#$&'(),/:;=?@[]]+/)?$ view/modeYoutube.php?v=$1 [QSA]
|
||||
RewriteRule ^video/(.[0-9a-zA-Z_.-]+)/([^!#$&'(),/:;=?@[]]+/)?$ view/modeYoutube.php?v=$1 [QSA]
|
||||
|
@ -172,8 +175,6 @@ Options All -Indexes
|
|||
RewriteRule ^video/([0-9a-zA-Z_.-]+)/?$ view/modeYoutube.php?videoName=$1 [QSA]
|
||||
|
||||
#Other video routes
|
||||
RewriteRule ^video/([0-9]+)/?$ view/modeYoutube.php?videos_id=$1 [QSA]
|
||||
RewriteRule ^video/([0-9]+)/poster.png$ view/videoGetPoster.php?videos_id=$1 [QSA]
|
||||
RewriteRule ^v/([0-9a-zA-Z_.-]+)/page/([0-9]+)/?$ view/modeYoutube.php?v=$1&page=$2 [QSA]
|
||||
RewriteRule ^v/([0-9a-zA-Z_.-]+)/?$ view/modeYoutube.php?v=$1 [QSA]
|
||||
RewriteRule ^evideo/([a-zA-z0-9=]+)/?$ view/modeYoutube.php?evideo=$1 [QSA]
|
||||
|
|
|
@ -4398,7 +4398,7 @@ function getLdJson($videos_id)
|
|||
|
||||
$img = Video::getPoster($videos_id);
|
||||
|
||||
$description = getSEODescription(empty(trim($video['description'])) ? $video['title'] : $video['description']);
|
||||
$description = getSEODescription(_empty($video['description']) ? $video['title'] : $video['description']);
|
||||
$duration = Video::getItemPropDuration($video['duration']);
|
||||
if ($duration == "PT0H0M0S") {
|
||||
$duration = "PT0H0M1S";
|
||||
|
|
|
@ -111,7 +111,7 @@ foreach ($playList as $key => $value) {
|
|||
if (empty($videoStartSeconds)) {
|
||||
$videoStartSeconds = parseDurationToSeconds(@$externalOptions->videoStartSeconds);
|
||||
}
|
||||
$playListData[] = new PlayListElement($value['title'], $value['description'], $value['duration'], $playListSources, $thumbnail, $images->poster, $videoStartSeconds, $value['cre'], $value['likes'], $value['views_count'], $value['videos_id'], "embedPlayList ", $subtitleTracks);
|
||||
$playListData[] = new PlayListElement(@$value['title'], @$value['description'], @$value['duration'], $playListSources, $thumbnail, $images->poster, $videoStartSeconds, $value['cre'],@$value['likes'], @$value['views_count'], @$value['videos_id'], "embedPlayList ", $subtitleTracks);
|
||||
//$playListData_videos_id[] = $value['videos_id'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,16 +73,16 @@ if (!empty($videoSerie)) {
|
|||
$indicator = '<span class="fa fa-play text-danger"></span>';
|
||||
} ?>
|
||||
<li class="<?php echo $class; ?>">
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>program/<?php echo $playlist_id; ?>/<?php echo $count . "/" . urlencode(cleanURLName(@$value["channelName"])) . "/" . urlencode(cleanURLName($playlist->getName())) . "/".(@$value['clean_title']); ?>" title="<?php echo $value['title']; ?>" class="videoLink row">
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>program/<?php echo $playlist_id; ?>/<?php echo $count . "/" . urlencode(cleanURLName(@$value["channelName"])) . "/" . urlencode(cleanURLName($playlist->getName())) . "/" . (@$value['clean_title']); ?>" title="<?php echo $value['title']; ?>" class="videoLink row">
|
||||
<div class="col-md-1 col-sm-1 col-xs-1">
|
||||
<?php echo $indicator; ?>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3 col-xs-3 nopadding">
|
||||
<?php
|
||||
if (($value['type'] !== "audio") && ($value['type'] !== "linkAudio")) {
|
||||
if(empty($value['images']['poster'])){
|
||||
if (empty($value['images']['poster'])) {
|
||||
$img = Video::getPoster($value['videos_id']);
|
||||
}else{
|
||||
} else {
|
||||
$img = $value['images']['poster'];
|
||||
}
|
||||
} else {
|
||||
|
@ -111,7 +111,7 @@ if (!empty($videoSerie)) {
|
|||
if (empty($advancedCustom->doNotDisplayViews)) {
|
||||
?>
|
||||
<div>
|
||||
<strong class=""><?php echo empty($value['views_count'])?0:number_format($value['views_count'], 0); ?></strong> <?php echo __("Views"); ?>
|
||||
<strong class=""><?php echo empty($value['views_count']) ? 0 : number_format($value['views_count'], 0); ?></strong> <?php echo __("Views"); ?>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
|
@ -126,4 +126,11 @@ if (!empty($videoSerie)) {
|
|||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
var ul = $(".playlistList ul");
|
||||
var li = ul.find("li.active");
|
||||
ul.scrollTop(ul.scrollTop() + li.position().top);
|
||||
});
|
||||
</script>
|
|
@ -250,7 +250,7 @@ if (!empty($evideo)) {
|
|||
$v = Video::getVideoFromCleanTitle($_GET['videoName']);
|
||||
}
|
||||
if (empty($v) && empty($videosPlayList[$playlist_index]['id'])) {
|
||||
$response = Video::whyUserCannotWatchVideo(User::getId(), $video['id']);
|
||||
$response = Video::whyUserCannotWatchVideo(User::getId(), @$video['id']);
|
||||
$html = "<ul><li>".implode('</li><li>', $response->why)."</li></ul>";
|
||||
videoNotFound($html);
|
||||
} else {
|
||||
|
|
|
@ -35,7 +35,7 @@ $video['filename'] = '';
|
|||
include $global['systemRootPath'] . 'view/include/head.php';
|
||||
?>
|
||||
</head>
|
||||
<body class="<?php echo $global['bodyClass']; ?>">
|
||||
<body class="<?php echo $global['bodyClass']; ?> videoNotFound">
|
||||
<?php include $global['systemRootPath'] . 'view/include/navbar.php'; ?>
|
||||
<!-- view videoNotFound.php -->
|
||||
<div class="container-fluid principalContainer" id="modeYoutubePrincipal" style="overflow: hidden;">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue