From 5e3c4c2e3e74d6f0767166f207ffe7280b54591a Mon Sep 17 00:00:00 2001 From: Killer069 <65385476+killer069@users.noreply.github.com> Date: Mon, 17 Jan 2022 18:01:42 +0530 Subject: [PATCH] Removed unused variables + seek improvements --- play-dl/YouTube/classes/WebmSeeker.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/play-dl/YouTube/classes/WebmSeeker.ts b/play-dl/YouTube/classes/WebmSeeker.ts index f5970da..d928b7c 100644 --- a/play-dl/YouTube/classes/WebmSeeker.ts +++ b/play-dl/YouTube/classes/WebmSeeker.ts @@ -33,7 +33,6 @@ export class WebmSeeker extends Duplex { private data_length: number; private sec: number; private time: number; - private foundCue: boolean; constructor(sec: number, options: WebmSeekerOptions) { super(options); @@ -47,7 +46,6 @@ export class WebmSeeker extends Duplex { this.data_size = 0; this.sec = sec; this.time = Math.floor(sec / 10) * 10; - this.foundCue = false; } private get vint_length(): number { @@ -147,7 +145,7 @@ export class WebmSeeker extends Duplex { // stop parsing the header once we have found the correct cue if ( ebmlID.name === 'cueClusterPosition' && - this.time === (this.header.segment.cues!.at(-1)!.time as number) / 1000 + this.time === (this.header.segment.cues!.at(-2)!.time as number) / 1000 ) this.emit('headComplete');