Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
解决 search 会被缓存的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
david082321 authored Sep 25, 2021
1 parent cd35d1d commit 4b425ee
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
} elseif ($path == "/pgc/player/api/playurl" || $path == "/pgc/player/web/playurl" || $path == "/x/web-interface/search/type") {
if (AREA=="cn") {
$host = CUSTOM_HOST_CN;
} else if (AREA=="hk") {
} elseif (AREA=="hk") {
$host = CUSTOM_HOST_HK;
} else if (AREA=="tw") {
} elseif (AREA=="tw") {
$host = CUSTOM_HOST_TW;
} else {
$host = CUSTOM_HOST_DEFAULT;
Expand Down Expand Up @@ -75,9 +75,11 @@
}
// 判断 playurl
$playurl = 0;
if ($path != "/intl/gateway/v2/app/search/type" && $path != "/intl/gateway/v2/app/subtitle" && $path != "/intl/gateway/v2/ogv/view/app/season") {
if ($path == "/x/v2/search/type" || $path == "/x/web-interface/search/type") {
$playurl = 3;
} elseif ($path != "/intl/gateway/v2/app/search/type" && $path != "/intl/gateway/v2/app/subtitle" && $path != "/intl/gateway/v2/ogv/view/app/season") {
$playurl = 1;
} else if ($path == "/intl/gateway/v2/ogv/view/app/season") {
} elseif ($path == "/intl/gateway/v2/ogv/view/app/season") {
$playurl = 2;
}
// 鉴权
Expand All @@ -98,7 +100,7 @@
exit($cache);
}
// 获取缓存 (东南亚season)
} else if (SAVE_CACHE == 1 && $playurl == 2) {
} elseif (SAVE_CACHE == 1 && $playurl == 2) {
include ("cache_season.php");
$cache = get_cache_season();
if ($cache != "") {
Expand Down

0 comments on commit 4b425ee

Please sign in to comment.