Skip to content

Commit

Permalink
fix(response): infoGroup.type
Browse files Browse the repository at this point in the history
  • Loading branch information
VirgilClyne committed Apr 24, 2024
1 parent 19ecdbe commit 0b61c31
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion js/BiliBili.Global.response.beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -10753,7 +10753,7 @@ class MessageType {

// import { Any } from "./protobuf/google/protobuf/any.js";

const $ = new ENV("📺 BiliBili: 🌐 Global v0.5.0(1005) repsonse.beta");
const $ = new ENV("📺 BiliBili: 🌐 Global v0.5.0(1006) repsonse.beta");

/***************** Processing *****************/
// 解构URL
Expand Down Expand Up @@ -11143,6 +11143,7 @@ $.log(`⚠ FORMAT: ${FORMAT}`, "");
infoGroup.seasonId = parseInt(data?.report?.season_id, 10) || data?.supplement?.ogv_data?.season_id || infoGroup.seasonId;
infoGroup.mId = parseInt(data?.report?.up_mid, 10) || data?.owner?.mid || infoGroup.mId;
//infoGroup.evaluate = result?.evaluate ?? infoGroup.evaluate;
if (infoGroup.seasonId || infoGroup.epId) infoGroup.type = "PGC";
switch (data.supplement?.typeUrl) {
case "type.googleapis.com/bilibili.app.viewunite.pgcanymodel.ViewPgcAny":
infoGroup.type = "PGC";
Expand Down
2 changes: 1 addition & 1 deletion js/BiliBili.Global.response.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/BiliBili.Global.response.beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import addgRPCHeader from "./function/addgRPCHeader.mjs";
import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "../node_modules/@protobuf-ts/runtime/build/es2015/index.js";
// import { Any } from "./protobuf/google/protobuf/any.js";

const $ = new ENV("📺 BiliBili: 🌐 Global v0.5.0(1005) repsonse.beta");
const $ = new ENV("📺 BiliBili: 🌐 Global v0.5.0(1006) repsonse.beta");

/***************** Processing *****************/
// 解构URL
Expand Down Expand Up @@ -416,6 +416,7 @@ $.log(`⚠ FORMAT: ${FORMAT}`, "");
infoGroup.seasonId = parseInt(data?.report?.season_id, 10) || data?.supplement?.ogv_data?.season_id || infoGroup.seasonId;
infoGroup.mId = parseInt(data?.report?.up_mid, 10) || data?.owner?.mid || infoGroup.mId;
//infoGroup.evaluate = result?.evaluate ?? infoGroup.evaluate;
if (infoGroup.seasonId || infoGroup.epId) infoGroup.type = "PGC";
switch (data.supplement?.typeUrl) {
case "type.googleapis.com/bilibili.app.viewunite.pgcanymodel.ViewPgcAny":
infoGroup.type = "PGC";
Expand Down
3 changes: 2 additions & 1 deletion src/BiliBili.Global.response.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import addgRPCHeader from "./function/addgRPCHeader.mjs";

import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "../node_modules/@protobuf-ts/runtime/build/es2015/index.js";

const $ = new ENV("📺 BiliBili: 🌐 Global v0.5.0(1005) repsonse");
const $ = new ENV("📺 BiliBili: 🌐 Global v0.5.0(1006) repsonse");

/***************** Processing *****************/
// 解构URL
Expand Down Expand Up @@ -281,6 +281,7 @@ $.log(`⚠ FORMAT: ${FORMAT}`, "");
infoGroup.seasonId = parseInt(data?.report?.season_id, 10) || data?.supplement?.ogv_data?.season_id || infoGroup.seasonId;
infoGroup.mId = parseInt(data?.report?.up_mid, 10) || data?.owner?.mid || infoGroup.mId;
//infoGroup.evaluate = result?.evaluate ?? infoGroup.evaluate;
if (infoGroup.seasonId || infoGroup.epId) infoGroup.type = "PGC";
infoGroup.locales = detectLocales(infoGroup);
setCache(infoGroup, [], Caches);
break;
Expand Down

0 comments on commit 0b61c31

Please sign in to comment.