@danything/arib 1.3.0 → 1.3.1

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.
Files changed (2) hide show
  1. package/dist/bml.js +10 -5
  2. package/package.json +1 -1
package/dist/bml.js CHANGED
@@ -431,17 +431,22 @@ export class BmlDecoder {
431
431
  const mark = doneMark(component, version);
432
432
  if (component.done.get(moduleId) === mark)
433
433
  return;
434
- component.done.set(moduleId, mark);
435
434
  // 大きさ 0 は伸ばしようが無い。ファイルの無いモジュールとして配り、待っている受け側を終わらせる
436
435
  const empty = held.module.moduleSize === 0;
437
436
  const data = empty
438
437
  ? held.builder.data
439
438
  : inflate(held.builder.data, held.module.compression);
440
- if (data === null)
441
- return;
442
- const files = moduleFiles(data, held.module.contentType);
443
- if (files.length === 0 && !empty)
439
+ const files = data === null ? [] : moduleFiles(data, held.module.contentType);
440
+ /*
441
+ * **伸ばせない・分けられないモジュールは諦める。** 配らずに黙ると、受け側は DII に
442
+ * 載っている限り待ち続ける。ブロックは CRC を通っているので、組み直しても同じ結果になる
443
+ */
444
+ if (files.length === 0 && !empty) {
445
+ component.abandoned.add(moduleId);
446
+ this.sendList(component);
444
447
  return;
448
+ }
449
+ component.done.set(moduleId, mark);
445
450
  this.send({
446
451
  type: "moduleDownloaded",
447
452
  componentId: component.componentId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danything/arib",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "日本のデジタル放送 (ARIB) の TS を読む: PSI・PES・EIT・ARIB の文字・字幕・データ放送",
5
5
  "license": "MIT",
6
6
  "repository": {