mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Implement playlist redirection and improve video loading logs in modeYoutube.php
This commit is contained in:
parent
be5efab9af
commit
0e0ee74f10
1 changed files with 22 additions and 11 deletions
|
@ -91,6 +91,17 @@ if (!empty($evideo)) {
|
|||
$playListData = $plp->getPlayListData();
|
||||
//var_dump($playListData);exit;
|
||||
if (empty($playListData)) {
|
||||
|
||||
// check if in the playlist there is some media in the playlist_index and reditect it direct to the media
|
||||
$video = $plp->getCurrentVideo();
|
||||
if (!empty($video)) {
|
||||
$url = Video::getURL($video['id']);;
|
||||
if (!empty($url)) {
|
||||
header('Location: ' . $url);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($messagesFromPlayList)) {
|
||||
$messagesFromPlayList = array();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue