添加season支持 #9 @qi-mooo

添加season支持
pull/10/head
david082321 4 years ago committed by GitHub
commit 798d2eef5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,7 +1,7 @@
<?php
// 防止外部破解
define('SYSTEM', TRUE);
define('VERSION', '2.9.16');
define('VERSION', '2.9.17');
// 加载配置
include ("config.php");
// 加上json的Header
@ -18,7 +18,7 @@ if (SAVE_CACHE == 1) {
// 判断要转发的内容
$path = explode('/index.php', $_SERVER['PHP_SELF'])[0];
$query = $_SERVER['QUERY_STRING'];
if ($path == "/intl/gateway/v2/ogv/playurl") {
if ($path == "/intl/gateway/v2/ogv/playurl" || $path == "/intl/gateway/v2/ogv/view/app/season") {
$host = CUSTOM_HOST_TH;
} elseif ($path == "/intl/gateway/v2/app/search/type" || $path == "/intl/gateway/v2/app/subtitle") {
$host = CUSTOM_HOST_SUB;
@ -55,12 +55,12 @@ if ($path == "/intl/gateway/v2/ogv/playurl" || $path == "/pgc/player/api/playurl
}
}
// 模块请求都会带上X-From-Biliroaming的请求头为了防止被盗用可以加上请求头判断WEB接口暂不限制
if (BILIROAMING_VERSION == "" && BILIROAMING == 1 && $path != "/pgc/player/web/playurl") {
if (BILIROAMING_VERSION == "" && BILIROAMING == 1 && $path != "/pgc/player/web/playurl" && $path != "/intl/gateway/v2/ogv/view/app/season") {
exit(BLOCK_RETURN);
}
// 判断 playurl
$playurl = 0;
if ($path != "/intl/gateway/v2/app/search/type" && $path != "/intl/gateway/v2/app/subtitle") {
if ($path != "/intl/gateway/v2/app/search/type" && $path != "/intl/gateway/v2/app/subtitle" && $path != "/intl/gateway/v2/ogv/view/app/season") {
$playurl = 1;
}
// 鉴权
@ -115,4 +115,4 @@ function get_webpage($url,$host="",$ip="") {
curl_close($ch);
return $output;
}
?>
?>

@ -0,0 +1,3 @@
<?php
include($_SERVER['DOCUMENT_ROOT']."/index.php");
?>
Loading…
Cancel
Save