diff --git a/lib/parser/contents/index.js b/lib/parser/contents/index.js index f0f08e3c..e8a78de3 100644 --- a/lib/parser/contents/index.js +++ b/lib/parser/contents/index.js @@ -38,7 +38,7 @@ class Parser { on_response_received_endpoints: data.onResponseReceivedEndpoints && Parser.parseRR(data.onResponseReceivedEndpoints) || null, on_response_received_commands: data.onResponseReceivedCommands && Parser.parseRR(data.onResponseReceivedCommands) || null, /** @type {*} */ - continuation_contents: data.continuationContents && Parser.parseCC(data.continuationContents) || null, + continuation_contents: data.continuationContents && Parser.parseLC(data.continuationContents) || null, metadata: Parser.parse(data.metadata), header: Parser.parse(data.header), /** @type {import('./classes/PlayerMicroformat')} **/ @@ -77,7 +77,7 @@ class Parser { } } - static parseCC(data) { + static parseLC(data) { if (data.sectionListContinuation) return new SectionListContinuation(data.sectionListContinuation); } @@ -92,7 +92,7 @@ class Parser { } static parseFormats(formats) { - return formats?.map((format) => new Format(format)) || []; + return observe(formats?.map((format) => new Format(format)) || []); } static parse(data) { @@ -106,7 +106,7 @@ class Parser { const keys = Object.keys(item); const classname = this.sanitizeClassName(keys[0]); - if (!this.shouldIgnore(classname)) { + if (this.shouldIgnore(classname)) { try { const TargetClass = require('./classes/' + classname); results.push(new TargetClass(item[keys[0]]));