mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
18 lines
546 B
PHP
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);
|