Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jul 2, 2023
1 parent 50686da commit a4c1fa0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugin/PlayLists/embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,28 @@
$users_id = User::getId();

setPlayListIndex(0);

echo '<!-- line='.__LINE__.' -->';
foreach ($playList as $key => $value) {
$oldValue = $value;

echo '<!-- line='.__LINE__.' -->';
if (!User::isAdmin() && !Video::userGroupAndVideoGroupMatch($users_id, $value['videos_id'])) {
unset($playList[$key]);
continue;
}
echo '<!-- line='.__LINE__.' -->';

if ($key == $playlist_index) {
setPlayListIndex(count($playListData));
}
echo '<!-- line='.__LINE__.' -->';

if ($oldValue['type'] === 'serie' && !empty($oldValue['serie_playlists_id'])) {
echo '<!-- line='.__LINE__.' -->';
$subPlayList = PlayList::getVideosFromPlaylist($value['serie_playlists_id']);
echo '<!-- line='.__LINE__.' -->';
foreach ($subPlayList as $value) {
echo '<!-- line='.__LINE__.' -->';
$sources = getVideosURL($value['filename']);
$images = Video::getImageFromFilename($value['filename'], $value['type']);
$externalOptions = _json_decode($value['externalOptions']);
Expand Down Expand Up @@ -78,6 +84,7 @@
$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 subPlaylistCollection-{$oldValue['serie_playlists_id']}");
//$playListData_videos_id[] = $value['id'];
}
echo '<!-- line='.__LINE__.' -->';
} else {
$sources = getVideosURL($value['filename']);
$images = Video::getImageFromFilename($value['filename'], $value['type']);
Expand Down

0 comments on commit a4c1fa0

Please sign in to comment.