diff --git a/src/protobuf b/src/protobuf index 7d6c168..2c60d29 160000 --- a/src/protobuf +++ b/src/protobuf @@ -1 +1 @@ -Subproject commit 7d6c168cb923c8ba4d60a43f5a06accd39596efe +Subproject commit 2c60d29d825a7510b101f9eee8ce7f7147de424a diff --git a/src/response.dev.js b/src/response.dev.js index 6659905..cb9534e 100644 --- a/src/response.dev.js +++ b/src/response.dev.js @@ -4,6 +4,7 @@ import database from "./function/database.mjs"; import setENV from "./function/setENV.mjs"; import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "@protobuf-ts/runtime"; import { ViewReply } from "./protobuf/bilibili/app/viewunite/v1/viewunite.js"; +import { ViewPgcAny } from "./protobuf/bilibili/app/viewunite/pgcanymodel.js"; /***************** Processing *****************/ // 解构URL const url = new URL($request.url); @@ -201,13 +202,17 @@ log(`⚠ FORMAT: ${FORMAT}`, ""); //infoGroup.evaluate = result?.evaluate ?? infoGroup.evaluate; if (infoGroup.seasonId || infoGroup.epId) infoGroup.type = "PGC"; switch (body?.supplement?.typeUrl) { - case "type.googleapis.com/bilibili.app.viewunite.pgcanymodel.ViewPgcAny": + case "type.googleapis.com/bilibili.app.viewunite.pgcanymodel.ViewPgcAny": { infoGroup.type = "PGC"; + const PgcBody = ViewPgcAny.fromBinary(body?.supplement?.value); + log(`🚧 PgcBody: ${JSON.stringify(PgcBody)}`, ""); break; + } case "type.googleapis.com/bilibili.app.viewunite.ugcanymodel.ViewUgcAny": - default: + default: { infoGroup.type = "UGC"; break; + } } infoGroup.locales = detectLocales(infoGroup); setCache(infoGroup, [], Caches);