@dan-uni/dan-any-plugin-detaolu 0.7.3 → 0.9.2

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.
@@ -27,7 +27,7 @@ See the Apache Version 2.0 License for specific language governing permissions
27
27
  and limitations under the License.
28
28
  ***************************************************************************** */
29
29
 
30
- /*! For license information please see index.umd.min.js.LICENSE.txt */
30
+ /*! For license information please see index.min.js.LICENSE.txt */
31
31
 
32
32
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
33
33
 
@@ -23,6 +23,11 @@ export interface DanmuObjectRepresentative extends DanmuObject {
23
23
  disp_str: string;
24
24
  };
25
25
  }
26
+ export interface DanmuObjectDeleted extends DanmuObject {
27
+ pakku: {
28
+ deleted_reason: string;
29
+ };
30
+ }
26
31
  export interface DanmuChunk<ObjectType extends DanmuObject> {
27
32
  objs: ObjectType[];
28
33
  }
@@ -41,6 +46,7 @@ export interface DanmuClusterPtr {
41
46
  export interface DanmuClusterOutput {
42
47
  clusters: DanmuClusterPtr[];
43
48
  stats: Stats;
49
+ deleted_chunk: DanmuObjectDeleted[];
44
50
  }
45
51
  export declare class Stats {
46
52
  combined_identical: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dan-uni/dan-any-plugin-detaolu",
3
- "version": "0.7.3",
3
+ "version": "0.9.2",
4
4
  "description": "A filter, dedupe and anti-spam plugin of dan-any, a danmaku transformer lib, based on pakku.js.",
5
5
  "keywords": [
6
6
  "bangumi",
@@ -332,6 +332,7 @@ async function merge(
332
332
  const ret: DanmuClusterOutput = {
333
333
  clusters: [],
334
334
  stats: new Stats(),
335
+ deleted_chunk: [],
335
336
  }
336
337
 
337
338
  function apply_single_cluster(idx: int, obj: DanmuObject, desc: string) {
@@ -444,6 +445,12 @@ async function merge(
444
445
  s.deleted_blacklist++
445
446
  s.deleted_blacklist_each[matched] =
446
447
  (s.deleted_blacklist_each[matched] || 0) + 1
448
+ ret.deleted_chunk.push({
449
+ ...obj,
450
+ pakku: {
451
+ deleted_reason: `命中黑名单:${matched}`,
452
+ },
453
+ })
447
454
  }
448
455
  return null
449
456
  }
@@ -46,6 +46,12 @@ export interface DanmuObjectRepresentative extends DanmuObject {
46
46
  }
47
47
  }
48
48
 
49
+ export interface DanmuObjectDeleted extends DanmuObject {
50
+ pakku: {
51
+ deleted_reason: string
52
+ }
53
+ }
54
+
49
55
  export interface DanmuChunk<ObjectType extends DanmuObject> {
50
56
  objs: ObjectType[]
51
57
 
@@ -79,6 +85,7 @@ export interface DanmuClusterPtr {
79
85
  export interface DanmuClusterOutput {
80
86
  clusters: DanmuClusterPtr[]
81
87
  stats: Stats
88
+ deleted_chunk: DanmuObjectDeleted[]
82
89
  }
83
90
 
84
91
  export class Stats {