1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 10:49:36 +02:00

show site platform id

This commit is contained in:
DanieL 2022-12-14 11:35:56 -03:00
parent 2f7e0751dd
commit b36db883eb
4 changed files with 20 additions and 1 deletions

View file

@ -85,6 +85,8 @@ Options All -Indexes
RewriteEngine on
#VideoHLS for DRM
RewriteRule ^id/? view/id.php [NC,L,QSA]
RewriteRule glyphicons-halflings-regular(.+)$ view/bootstrap/fonts/glyphicons-halflings-regular$1 [NC,L]
RedirectMatch 404 /\.git

View file

@ -9850,3 +9850,8 @@ function getFeedButton($rss, $mrss, $roku) {
$buttons .= '</ul></div>';
return $buttons;
}
function getPlatformId() {
global $global;
return base_convert(md5(encryptString($global['salt'] . 'AVideo')), 16, 36);
}

View file

@ -176,7 +176,7 @@ class API extends PluginAbstract {
public function get_api_id($parameters) {
global $global;
$obj = $this->startResponseObject($parameters);
$obj->id = base_convert(md5(encryptString($global['salt'] . 'AVideo')), 16, 36);
$obj->id = getPlatformId();
return new ApiObject("", false, $obj);
}

12
view/id.php Normal file
View file

@ -0,0 +1,12 @@
<?php
global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
header('Content-Type: application/json');
$obj = new stdClass();
$obj->error = false;
$obj->id = getPlatformId();
echo json_encode($obj);