1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/objects/playlists.json.php
2022-03-17 11:43:59 -03:00

18 lines
546 B
PHP

<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
session_write_close();
if (!User::isLogged()) {
die();
}
require_once $global['systemRootPath'] . 'objects/playlist.php';
header('Content-Type: application/json');
$row = PlayList::getAllFromUser(User::getId(), false);
foreach ($row as $key => $value) {
foreach ($row[$key]['videos'] as $key2 => $value2) {
unset($row[$key]['videos'][$key2]['description']);
}
}
echo json_encode($row);