Skip to content

Commit

Permalink
docs: src
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Nov 1, 2024
1 parent 678d4c2 commit 5e256ca
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/request.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`, "");
const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0];
log(`⚠ FORMAT: ${FORMAT}`, "");
!(async () => {
// 读取设置
/**
* 设置
* @type {{Settings: import('./types').Settings}}
*/
const { Settings, Caches, Configs } = setENV("BiliBili", "Global", database);
log(`⚠ Settings.Switch: ${Settings?.Switch}`, "");
switch (Settings.Switch) {
Expand Down
8 changes: 6 additions & 2 deletions src/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`, "");
const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0];
log(`⚠ FORMAT: ${FORMAT}`, "");
!(async () => {
// 读取设置
/**
* 设置
* @type {{Settings: import('./types').Settings}}
*/
const { Settings, Caches, Configs } = setENV("BiliBili", "Global", database);
log(`⚠ Settings.Switch: ${Settings?.Switch}`, "");
switch (Settings.Switch) {
Expand Down Expand Up @@ -205,7 +208,8 @@ log(`⚠ FORMAT: ${FORMAT}`, "");
switch (PATHs?.[0]) {
case "bangumi": // 番剧-web
switch (PATHs?.[1]) {
case "play": { // 番剧-播放页-web
case "play": {
// 番剧-播放页-web
const URLRegex = /ss(?<seasonId>[0-9]+)|ep(?<epId>[0-9]+)/;
({ seasonId: infoGroup.seasonId, epId: infoGroup.epId } = PATHs?.[2].match(URLRegex)?.groups);
infoGroup.seasonId = Number.parseInt(infoGroup.seasonId, 10) || infoGroup.seasonId;
Expand Down
5 changes: 4 additions & 1 deletion src/response.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`, "");
const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0];
log(`⚠ FORMAT: ${FORMAT}`, "");
!(async () => {
// 读取设置
/**
* 设置
* @type {{Settings: import('./types').Settings}}
*/
const { Settings, Caches, Configs } = setENV("BiliBili", "Global", database);
log(`⚠ Settings.Switch: ${Settings?.Switch}`, "");
switch (Settings.Switch) {
Expand Down
5 changes: 4 additions & 1 deletion src/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`, "");
const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0];
log(`⚠ FORMAT: ${FORMAT}`, "");
!(async () => {
// 读取设置
/**
* 设置
* @type {{Settings: import('./types').Settings}}
*/
const { Settings, Caches, Configs } = setENV("BiliBili", "Global", database);
log(`⚠ Settings.Switch: ${Settings?.Switch}`, "");
switch (Settings.Switch) {
Expand Down

0 comments on commit 5e256ca

Please sign in to comment.