Skip to content

Commit d03f692

Browse files
fix: add missing getBestMatch import in deezer
1 parent d049baa commit d03f692

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sources/deezer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Buffer } from 'node:buffer'
22
import crypto from 'node:crypto'
33
import { PassThrough } from 'node:stream'
44
import BlowfishCBC from '../decrypters/blowfish-cbc.js'
5-
import { encodeTrack, http1makeRequest, logger, makeRequest } from '../utils.js'
5+
import { encodeTrack, http1makeRequest, logger, getBestMatch, makeRequest } from '../utils.js'
66

77
const IV = Buffer.from([0, 1, 2, 3, 4, 5, 6, 7])
88

@@ -464,17 +464,17 @@ export default class DeezerSource {
464464

465465
let i = 0
466466
const headers = {}
467-
467+
468468
if (additionalData.startTime !== undefined && additionalData.FILESIZE && additionalData.DURATION) {
469469
const durationMs = Number(additionalData.DURATION) * 1000
470470
const fileSize = Number(additionalData.FILESIZE)
471-
471+
472472
if (durationMs > 0 && fileSize > 0) {
473473
const byteRate = fileSize / durationMs
474474
const rawOffset = additionalData.startTime * byteRate
475475
const chunkIndex = Math.floor(rawOffset / bufferSize)
476476
const byteOffset = chunkIndex * bufferSize
477-
477+
478478
if (byteOffset > 0) {
479479
headers.Range = `bytes=${byteOffset}-`
480480
}

0 commit comments

Comments
 (0)