@dan-uni/dan-any 1.1.1 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/browser/17.min.js +13286 -0
- package/dist/browser/705.min.js +77 -0
- package/dist/browser/898.min.js +10 -0
- package/dist/browser/index.min.js +1 -13248
- package/dist/browser/plugins/bili.min.js +1 -0
- package/dist/browser/plugins/index.min.js +2 -1
- package/dist/browser/plugins/stats.min.js +1 -0
- package/dist/browser/src/index.d.ts +1 -4
- package/dist/browser/src/plugins/bili/dedupe.d.ts +3 -0
- package/dist/browser/src/plugins/bili/history-danmaku-fast-forward.d.ts +18 -0
- package/dist/browser/src/plugins/bili/index.d.ts +2 -0
- package/dist/browser/src/plugins/index.d.ts +2 -2
- package/dist/browser/src/plugins/stats/getLatestDan.d.ts +6 -0
- package/dist/browser/src/plugins/stats/index.d.ts +1 -0
- package/dist/node/17.js +1861 -0
- package/dist/node/705.js +77 -0
- package/dist/node/898.js +10 -0
- package/dist/node/index.js +1 -1823
- package/dist/node/plugins/bili.js +1 -0
- package/dist/node/plugins/index.js +2 -1
- package/dist/node/plugins/stats.js +1 -0
- package/dist/node/src/index.d.ts +1 -4
- package/dist/node/src/plugins/bili/dedupe.d.ts +3 -0
- package/dist/node/src/plugins/bili/history-danmaku-fast-forward.d.ts +18 -0
- package/dist/node/src/plugins/bili/index.d.ts +2 -0
- package/dist/node/src/plugins/index.d.ts +2 -2
- package/dist/node/src/plugins/stats/getLatestDan.d.ts +6 -0
- package/dist/node/src/plugins/stats/index.d.ts +1 -0
- package/dist/node/src/plugins/stats/index.test.d.ts +1 -0
- package/dist/umd/index.umd.min.js +73 -68
- package/dist/umd/plugins/bili.umd.min.js +29639 -0
- package/dist/umd/plugins/bili.umd.min.js.LICENSE.txt +34 -0
- package/dist/umd/plugins/index.umd.min.js +29584 -23
- package/dist/umd/plugins/index.umd.min.js.LICENSE.txt +34 -0
- package/dist/umd/plugins/stats.umd.min.js +39 -0
- package/dist/umd/src/index.d.ts +1 -4
- package/dist/umd/src/plugins/bili/dedupe.d.ts +3 -0
- package/dist/umd/src/plugins/bili/history-danmaku-fast-forward.d.ts +18 -0
- package/dist/umd/src/plugins/bili/index.d.ts +2 -0
- package/dist/umd/src/plugins/bili/index.test.d.ts +1 -0
- package/dist/umd/src/plugins/index.d.ts +2 -2
- package/dist/umd/src/plugins/stats/getLatestDan.d.ts +6 -0
- package/dist/umd/src/plugins/stats/index.d.ts +1 -0
- package/dist/umd/src/plugins/stats/index.test.d.ts +1 -0
- package/package.json +4 -2
- package/rslib.config.ts +2 -1
- package/src/index.ts +1 -7
- package/src/plugins/bili/README.md +87 -0
- package/src/plugins/{bili-dedupe/index.ts → bili/dedupe.ts} +13 -3
- package/src/plugins/bili/history-danmaku-fast-forward.ts +86 -0
- package/src/plugins/bili/index.test.ts +129 -0
- package/src/plugins/bili/index.ts +2 -0
- package/src/plugins/index.ts +2 -3
- package/src/plugins/stats/README.md +44 -0
- package/src/plugins/stats/getLatestDan.ts +13 -0
- package/src/plugins/{bili-dedupe → stats}/index.test.ts +10 -11
- package/src/plugins/stats/index.ts +1 -0
- package/dist/browser/157.min.js +0 -14
- package/dist/browser/42.min.js +0 -45
- package/dist/browser/plugins/bili-dedupe.min.js +0 -1
- package/dist/browser/src/plugins/bili-dedupe/index.d.ts +0 -5
- package/dist/node/157.js +0 -14
- package/dist/node/42.js +0 -45
- package/dist/node/plugins/bili-dedupe.js +0 -1
- package/dist/node/src/plugins/bili-dedupe/index.d.ts +0 -5
- package/dist/umd/plugins/bili-dedupe.umd.min.js +0 -79
- package/dist/umd/src/plugins/bili-dedupe/index.d.ts +0 -5
- /package/dist/browser/{index.min.js.LICENSE.txt → 17.min.js.LICENSE.txt} +0 -0
- /package/dist/browser/src/plugins/{bili-dedupe → bili}/index.test.d.ts +0 -0
- /package/dist/{node/src/plugins/bili-dedupe → browser/src/plugins/stats}/index.test.d.ts +0 -0
- /package/dist/{umd/src/plugins/bili-dedupe → node/src/plugins/bili}/index.test.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { bili_dedupe, bili_history_fast_forward } from "../705.js";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { bili } from "../705.js";
|
|
2
|
+
export { stats } from "../898.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getLatestDan } from "../898.js";
|
package/dist/node/src/index.d.ts
CHANGED
|
@@ -120,8 +120,6 @@ export type DM_format = 'danuni.json' | 'danuni.pb.bin' | 'bili.xml' | 'bili.pb.
|
|
|
120
120
|
type shareItems = Partial<Pick<UniDMTools.UniDMObj, 'SOID' | 'senderID' | 'platform' | 'SOID' | 'pool' | 'mode' | 'color'>>;
|
|
121
121
|
type statItems = Partial<Pick<UniDMTools.UniDMObj, 'SOID' | 'mode' | 'fontsize' | 'color' | 'senderID' | 'content' | 'weight' | 'pool' | 'platform'>>;
|
|
122
122
|
type Stats<T extends keyof statItems> = Map<statItems[T], number>;
|
|
123
|
-
type UniPoolPipe = (that: UniPool) => Promise<UniPool>;
|
|
124
|
-
type UniPoolPipeSync = (that: UniPool) => UniPool;
|
|
125
123
|
export interface Options {
|
|
126
124
|
dedupe?: boolean;
|
|
127
125
|
/**
|
|
@@ -145,8 +143,7 @@ export declare class UniPool {
|
|
|
145
143
|
*/
|
|
146
144
|
fromConverted: boolean;
|
|
147
145
|
});
|
|
148
|
-
pipe(fn:
|
|
149
|
-
pipeSync(fn: UniPoolPipeSync): UniPool;
|
|
146
|
+
pipe<T extends (...args: any) => any>(fn: T): ReturnType<T>;
|
|
150
147
|
/**
|
|
151
148
|
* @deprecated 使用 `getShared` 代替
|
|
152
149
|
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 注:该方法受BiliPlus全弹幕下载器启发
|
|
3
|
+
* 详情参考以下链接
|
|
4
|
+
* @see https://github.com/HengXin666/BiLiBiLi_DanMu_Crawling/issues/14
|
|
5
|
+
*/
|
|
6
|
+
import type { UniPool } from '../..';
|
|
7
|
+
interface BiliHistoryDanmakuFastForwardResult {
|
|
8
|
+
earliest: string | null;
|
|
9
|
+
FastForward: string[];
|
|
10
|
+
skip: string[];
|
|
11
|
+
SpecificDate: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function bili_history_fast_forward(
|
|
14
|
+
/**
|
|
15
|
+
* 请求api时使用的日期(UTC+8, yyyy-MM-dd)
|
|
16
|
+
*/
|
|
17
|
+
query_history_date: string): (that: UniPool) => BiliHistoryDanmakuFastForwardResult;
|
|
18
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
export * as bili from './bili';
|
|
2
|
+
export * as stats from './stats';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as getLatestDan } from './getLatestDan';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13570,6 +13570,51 @@
|
|
|
13570
13570
|
return number + '';
|
|
13571
13571
|
};
|
|
13572
13572
|
},
|
|
13573
|
+
"./src/utils/platform.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
13574
|
+
"use strict";
|
|
13575
|
+
__webpack_require__.r(__webpack_exports__);
|
|
13576
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
13577
|
+
PlatformDanmakuOnlySource: ()=>PlatformDanmakuOnlySource,
|
|
13578
|
+
PlatformDanmakuOnlySources: ()=>PlatformDanmakuOnlySources,
|
|
13579
|
+
PlatformDanmakuSources: ()=>PlatformDanmakuSources,
|
|
13580
|
+
PlatformInfoSource: ()=>PlatformInfoSource,
|
|
13581
|
+
PlatformInfoSources: ()=>PlatformInfoSources,
|
|
13582
|
+
PlatformSources: ()=>PlatformSources,
|
|
13583
|
+
PlatformVideoSource: ()=>PlatformVideoSource,
|
|
13584
|
+
PlatformVideoSources: ()=>PlatformVideoSources
|
|
13585
|
+
});
|
|
13586
|
+
var PlatformInfoSource = /*#__PURE__*/ function(PlatformInfoSource) {
|
|
13587
|
+
PlatformInfoSource["Bangumi"] = "bgm";
|
|
13588
|
+
PlatformInfoSource["TMDB"] = "tmdb";
|
|
13589
|
+
return PlatformInfoSource;
|
|
13590
|
+
}({});
|
|
13591
|
+
const PlatformInfoSources = Object.values(PlatformInfoSource);
|
|
13592
|
+
var PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
|
|
13593
|
+
PlatformVideoSource["Acfun"] = "acfun";
|
|
13594
|
+
PlatformVideoSource["Baha"] = "baha";
|
|
13595
|
+
PlatformVideoSource["Bilibili"] = "bili";
|
|
13596
|
+
PlatformVideoSource["BilibiliGlobal"] = "bglobal";
|
|
13597
|
+
PlatformVideoSource["Iqiyi"] = "iqiyi";
|
|
13598
|
+
PlatformVideoSource["Tencent"] = "tencent";
|
|
13599
|
+
PlatformVideoSource["Youku"] = "youku";
|
|
13600
|
+
return PlatformVideoSource;
|
|
13601
|
+
}({});
|
|
13602
|
+
const PlatformVideoSources = Object.values(PlatformVideoSource);
|
|
13603
|
+
var PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
|
|
13604
|
+
PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
|
|
13605
|
+
PlatformDanmakuOnlySource["TuCao"] = "tucao";
|
|
13606
|
+
return PlatformDanmakuOnlySource;
|
|
13607
|
+
}({});
|
|
13608
|
+
const PlatformDanmakuOnlySources = Object.values(PlatformDanmakuOnlySource);
|
|
13609
|
+
const PlatformDanmakuSources = [
|
|
13610
|
+
...PlatformVideoSources,
|
|
13611
|
+
...PlatformDanmakuOnlySources
|
|
13612
|
+
];
|
|
13613
|
+
const PlatformSources = [
|
|
13614
|
+
...PlatformInfoSources,
|
|
13615
|
+
...PlatformDanmakuSources
|
|
13616
|
+
];
|
|
13617
|
+
},
|
|
13573
13618
|
"?c028" () {},
|
|
13574
13619
|
"?8beb" () {},
|
|
13575
13620
|
"../../node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
@@ -14217,24 +14262,12 @@ and limitations under the License.
|
|
|
14217
14262
|
"use strict";
|
|
14218
14263
|
__webpack_require__.r(__webpack_exports__);
|
|
14219
14264
|
__webpack_require__.d(__webpack_exports__, {
|
|
14220
|
-
platform: ()=>
|
|
14265
|
+
platform: ()=>platform,
|
|
14221
14266
|
UniDM: ()=>UniDM,
|
|
14222
14267
|
UniDMTools: ()=>dm_gen_namespaceObject,
|
|
14223
14268
|
UniPool: ()=>UniPool,
|
|
14224
14269
|
UniIDTools: ()=>id_gen_namespaceObject
|
|
14225
14270
|
});
|
|
14226
|
-
var platform_namespaceObject = {};
|
|
14227
|
-
__webpack_require__.r(platform_namespaceObject);
|
|
14228
|
-
__webpack_require__.d(platform_namespaceObject, {
|
|
14229
|
-
PlatformDanmakuOnlySource: ()=>platform_PlatformDanmakuOnlySource,
|
|
14230
|
-
PlatformDanmakuOnlySources: ()=>PlatformDanmakuOnlySources,
|
|
14231
|
-
PlatformDanmakuSources: ()=>PlatformDanmakuSources,
|
|
14232
|
-
PlatformInfoSource: ()=>platform_PlatformInfoSource,
|
|
14233
|
-
PlatformInfoSources: ()=>PlatformInfoSources,
|
|
14234
|
-
PlatformSources: ()=>PlatformSources,
|
|
14235
|
-
PlatformVideoSource: ()=>platform_PlatformVideoSource,
|
|
14236
|
-
PlatformVideoSources: ()=>PlatformVideoSources
|
|
14237
|
-
});
|
|
14238
14271
|
var id_gen_namespaceObject = {};
|
|
14239
14272
|
__webpack_require__.r(id_gen_namespaceObject);
|
|
14240
14273
|
__webpack_require__.d(id_gen_namespaceObject, {
|
|
@@ -15074,11 +15107,11 @@ and limitations under the License.
|
|
|
15074
15107
|
},
|
|
15075
15108
|
num_dec: {
|
|
15076
15109
|
regex: /&#([0-9]{1,7});/g,
|
|
15077
|
-
val: (_, str)=>
|
|
15110
|
+
val: (_, str)=>fromCodePoint(str, 10, "&#")
|
|
15078
15111
|
},
|
|
15079
15112
|
num_hex: {
|
|
15080
15113
|
regex: /&#x([0-9a-fA-F]{1,6});/g,
|
|
15081
|
-
val: (_, str)=>
|
|
15114
|
+
val: (_, str)=>fromCodePoint(str, 16, "&#x")
|
|
15082
15115
|
}
|
|
15083
15116
|
};
|
|
15084
15117
|
this.addExternalEntities = addExternalEntities;
|
|
@@ -15454,6 +15487,11 @@ and limitations under the License.
|
|
|
15454
15487
|
if (isExist(val)) return val;
|
|
15455
15488
|
return '';
|
|
15456
15489
|
}
|
|
15490
|
+
function fromCodePoint(str, base, prefix) {
|
|
15491
|
+
const codePoint = Number.parseInt(str, base);
|
|
15492
|
+
if (codePoint >= 0 && codePoint <= 0x10FFFF) return String.fromCodePoint(codePoint);
|
|
15493
|
+
return prefix + str + ";";
|
|
15494
|
+
}
|
|
15457
15495
|
const node2json_METADATA_SYMBOL = XmlNode.getMetaDataSymbol();
|
|
15458
15496
|
function prettify(node, options) {
|
|
15459
15497
|
return node2json_compress(node, options);
|
|
@@ -21010,7 +21048,7 @@ and limitations under the License.
|
|
|
21010
21048
|
function timestamp_timestampMs(timestamp) {
|
|
21011
21049
|
return 1000 * Number(timestamp.seconds) + Math.round(timestamp.nanos / 1000000);
|
|
21012
21050
|
}
|
|
21013
|
-
var package_namespaceObject = JSON.parse('{"UU":"@dan-uni/dan-any","rE":"1.
|
|
21051
|
+
var package_namespaceObject = JSON.parse('{"UU":"@dan-uni/dan-any","rE":"1.2.5","TB":"https://github.com/ani-uni/danuni/tree/master/packages/dan-any#readme"}');
|
|
21014
21052
|
const color_pad = (s)=>s.length < 2 ? `0${s}` : s;
|
|
21015
21053
|
const decimalToHex = (n)=>color_pad(n.toString(16));
|
|
21016
21054
|
const isDarkColor = ({ r, g, b })=>0.299 * r + 0.587 * g + 0.114 * b < 0x30;
|
|
@@ -23247,37 +23285,7 @@ and limitations under the License.
|
|
|
23247
23285
|
return this.P.getHMAC(t, n);
|
|
23248
23286
|
}
|
|
23249
23287
|
}
|
|
23250
|
-
var
|
|
23251
|
-
PlatformInfoSource["Bangumi"] = "bgm";
|
|
23252
|
-
PlatformInfoSource["TMDB"] = "tmdb";
|
|
23253
|
-
return PlatformInfoSource;
|
|
23254
|
-
}({});
|
|
23255
|
-
const PlatformInfoSources = Object.values(platform_PlatformInfoSource);
|
|
23256
|
-
var platform_PlatformVideoSource = /*#__PURE__*/ function(PlatformVideoSource) {
|
|
23257
|
-
PlatformVideoSource["Acfun"] = "acfun";
|
|
23258
|
-
PlatformVideoSource["Baha"] = "baha";
|
|
23259
|
-
PlatformVideoSource["Bilibili"] = "bili";
|
|
23260
|
-
PlatformVideoSource["BilibiliGlobal"] = "bglobal";
|
|
23261
|
-
PlatformVideoSource["Iqiyi"] = "iqiyi";
|
|
23262
|
-
PlatformVideoSource["Tencent"] = "tencent";
|
|
23263
|
-
PlatformVideoSource["Youku"] = "youku";
|
|
23264
|
-
return PlatformVideoSource;
|
|
23265
|
-
}({});
|
|
23266
|
-
const PlatformVideoSources = Object.values(platform_PlatformVideoSource);
|
|
23267
|
-
var platform_PlatformDanmakuOnlySource = /*#__PURE__*/ function(PlatformDanmakuOnlySource) {
|
|
23268
|
-
PlatformDanmakuOnlySource["DanDanPlay"] = "ddplay";
|
|
23269
|
-
PlatformDanmakuOnlySource["TuCao"] = "tucao";
|
|
23270
|
-
return PlatformDanmakuOnlySource;
|
|
23271
|
-
}({});
|
|
23272
|
-
const PlatformDanmakuOnlySources = Object.values(platform_PlatformDanmakuOnlySource);
|
|
23273
|
-
const PlatformDanmakuSources = [
|
|
23274
|
-
...PlatformVideoSources,
|
|
23275
|
-
...PlatformDanmakuOnlySources
|
|
23276
|
-
];
|
|
23277
|
-
const PlatformSources = [
|
|
23278
|
-
...PlatformInfoSources,
|
|
23279
|
-
...PlatformDanmakuSources
|
|
23280
|
-
];
|
|
23288
|
+
var platform = __webpack_require__("./src/utils/platform.ts");
|
|
23281
23289
|
class id_gen_UniID {
|
|
23282
23290
|
constructor(id, domain){
|
|
23283
23291
|
this.id = id;
|
|
@@ -23294,10 +23302,10 @@ and limitations under the License.
|
|
|
23294
23302
|
return new id_gen_UniID('runtime' === domain ? 'runtime' : 'anonymous', domain || 'danuni');
|
|
23295
23303
|
}
|
|
23296
23304
|
static fromBili({ cid, mid, midHash }) {
|
|
23297
|
-
if (cid) return new id_gen_UniID(cid.toString(),
|
|
23298
|
-
if (mid) return new id_gen_UniID(mid.toString(),
|
|
23299
|
-
if (midHash) return new id_gen_UniID(midHash,
|
|
23300
|
-
return this.fromNull(
|
|
23305
|
+
if (cid) return new id_gen_UniID(cid.toString(), platform.PlatformVideoSource.Bilibili);
|
|
23306
|
+
if (mid) return new id_gen_UniID(mid.toString(), platform.PlatformVideoSource.Bilibili);
|
|
23307
|
+
if (midHash) return new id_gen_UniID(midHash, platform.PlatformVideoSource.Bilibili);
|
|
23308
|
+
return this.fromNull(platform.PlatformVideoSource.Bilibili);
|
|
23301
23309
|
}
|
|
23302
23310
|
static fromUnknown(id, domain) {
|
|
23303
23311
|
if (id) return new id_gen_UniID(id, domain);
|
|
@@ -23479,7 +23487,7 @@ and limitations under the License.
|
|
|
23479
23487
|
return extra;
|
|
23480
23488
|
}
|
|
23481
23489
|
get isFrom3rdPlatform() {
|
|
23482
|
-
if (this.platform && PlatformDanmakuSources.includes(this.platform)) return true;
|
|
23490
|
+
if (this.platform && platform.PlatformDanmakuSources.includes(this.platform)) return true;
|
|
23483
23491
|
return false;
|
|
23484
23492
|
}
|
|
23485
23493
|
toDMID() {
|
|
@@ -23633,7 +23641,7 @@ and limitations under the License.
|
|
|
23633
23641
|
}
|
|
23634
23642
|
static fromBili(args, cid, options, recSOID) {
|
|
23635
23643
|
if (args.oid && !cid) cid = args.oid;
|
|
23636
|
-
const SOID = recSOID || `def_${
|
|
23644
|
+
const SOID = recSOID || `def_${platform.PlatformVideoSource.Bilibili}+${id_gen_UniID.fromBili({
|
|
23637
23645
|
cid
|
|
23638
23646
|
})}`;
|
|
23639
23647
|
const senderID = IsEmail_isEmail(args.midHash, {
|
|
@@ -23686,8 +23694,8 @@ and limitations under the License.
|
|
|
23686
23694
|
ctime: this.transCtime(args.ctime, 's'),
|
|
23687
23695
|
weight: args.weight || (3 === pool ? 1 : 0),
|
|
23688
23696
|
pool,
|
|
23689
|
-
attr: DMAttrUtils.fromBin(args.attr,
|
|
23690
|
-
platform:
|
|
23697
|
+
attr: DMAttrUtils.fromBin(args.attr, platform.PlatformVideoSource.Bilibili),
|
|
23698
|
+
platform: platform.PlatformVideoSource.Bilibili,
|
|
23691
23699
|
extra
|
|
23692
23700
|
}, options);
|
|
23693
23701
|
}
|
|
@@ -23738,7 +23746,7 @@ and limitations under the License.
|
|
|
23738
23746
|
this.color,
|
|
23739
23747
|
this.ctime.getTime() / 1000,
|
|
23740
23748
|
this.extra.bili?.pool || this.pool,
|
|
23741
|
-
options?.avoidSenderIDWithAt ? this.senderID.replaceAll(`@${
|
|
23749
|
+
options?.avoidSenderIDWithAt ? this.senderID.replaceAll(`@${platform.PlatformVideoSource.Bilibili}`, '') : this.senderID,
|
|
23742
23750
|
this.extra.bili?.dmid || this.DMID || this.toDMID(),
|
|
23743
23751
|
this.weight
|
|
23744
23752
|
].join(',')
|
|
@@ -23746,7 +23754,7 @@ and limitations under the License.
|
|
|
23746
23754
|
}
|
|
23747
23755
|
static fromBiliCommand(args, cid, options) {
|
|
23748
23756
|
if (args.oid && !cid) cid = args.oid;
|
|
23749
|
-
const SOID = `def_${
|
|
23757
|
+
const SOID = `def_${platform.PlatformVideoSource.Bilibili}+${id_gen_UniID.fromBili({
|
|
23750
23758
|
cid
|
|
23751
23759
|
})}`;
|
|
23752
23760
|
const senderID = id_gen_UniID.fromBili({
|
|
@@ -23763,7 +23771,7 @@ and limitations under the License.
|
|
|
23763
23771
|
attr: [
|
|
23764
23772
|
"Protect"
|
|
23765
23773
|
],
|
|
23766
|
-
platform:
|
|
23774
|
+
platform: platform.PlatformVideoSource.Bilibili,
|
|
23767
23775
|
extra: {
|
|
23768
23776
|
bili: {
|
|
23769
23777
|
command: args
|
|
@@ -23835,8 +23843,8 @@ and limitations under the License.
|
|
|
23835
23843
|
style: this.extra.artplayer?.style
|
|
23836
23844
|
};
|
|
23837
23845
|
}
|
|
23838
|
-
static fromDDplay(args, episodeId, domain =
|
|
23839
|
-
const SOID = id_gen_UniID.fromUnknown(`def_${
|
|
23846
|
+
static fromDDplay(args, episodeId, domain = platform.PlatformDanmakuOnlySource.DanDanPlay, options) {
|
|
23847
|
+
const SOID = id_gen_UniID.fromUnknown(`def_${platform.PlatformDanmakuOnlySource.DanDanPlay}+${episodeId}`, domain);
|
|
23840
23848
|
return this.create({
|
|
23841
23849
|
...args,
|
|
23842
23850
|
SOID: SOID.toString(),
|
|
@@ -24489,10 +24497,7 @@ and limitations under the License.
|
|
|
24489
24497
|
if (false !== options.dedupe) options.dedupe = true;
|
|
24490
24498
|
if (this.options.dedupe) this.dedupe();
|
|
24491
24499
|
}
|
|
24492
|
-
|
|
24493
|
-
return fn(this);
|
|
24494
|
-
}
|
|
24495
|
-
pipeSync(fn) {
|
|
24500
|
+
pipe(fn) {
|
|
24496
24501
|
return fn(this);
|
|
24497
24502
|
}
|
|
24498
24503
|
get shared() {
|
|
@@ -24861,14 +24866,14 @@ and limitations under the License.
|
|
|
24861
24866
|
toBiliXML(options) {
|
|
24862
24867
|
const genCID = (id)=>{
|
|
24863
24868
|
const UniID = id_gen_UniID.fromString(id);
|
|
24864
|
-
if (UniID.domain ===
|
|
24865
|
-
const cid = UniID.id.replaceAll(`def_${
|
|
24869
|
+
if (UniID.domain === platform.PlatformVideoSource.Bilibili) {
|
|
24870
|
+
const cid = UniID.id.replaceAll(`def_${platform.PlatformVideoSource.Bilibili}+`, '');
|
|
24866
24871
|
if (cid) return cid;
|
|
24867
24872
|
}
|
|
24868
24873
|
return !options?.cid || id;
|
|
24869
24874
|
};
|
|
24870
24875
|
if (options?.avoidSenderIDWithAt) {
|
|
24871
|
-
const ok = this.dans.every((d)=>d.senderID.endsWith(`@${
|
|
24876
|
+
const ok = this.dans.every((d)=>d.senderID.endsWith(`@${platform.PlatformVideoSource.Bilibili}`));
|
|
24872
24877
|
if (!ok) throw new Error('存在其他来源的senderID,请关闭该功能再试!');
|
|
24873
24878
|
}
|
|
24874
24879
|
const builder = new Builder({
|
|
@@ -25003,7 +25008,7 @@ and limitations under the License.
|
|
|
25003
25008
|
});
|
|
25004
25009
|
}
|
|
25005
25010
|
toDDplay() {
|
|
25006
|
-
const episodeId = this.dans[0].SOID.split('@')[0].replaceAll(`def_${
|
|
25011
|
+
const episodeId = this.dans[0].SOID.split('@')[0].replaceAll(`def_${platform.PlatformDanmakuOnlySource.DanDanPlay}+`, '');
|
|
25007
25012
|
return {
|
|
25008
25013
|
danuni: {
|
|
25009
25014
|
...DanUniConvertTipTemplate,
|