diff --git a/src/utils/height.ts b/src/utils/height.ts index 521a6f2..73ed811 100644 --- a/src/utils/height.ts +++ b/src/utils/height.ts @@ -2,13 +2,7 @@ import { Context } from '../types'; import { CustomRequestConfig, Fetcher } from './Fetcher'; export const guessHeightFromPlaylist = async (ctx: Context, fetcher: Fetcher, playlistUrl: URL, init?: CustomRequestConfig): Promise => { - let m3u8Data: string; - try { - m3u8Data = await fetcher.text(ctx, playlistUrl, init); - } catch { - /* istanbul ignore next */ - return undefined; - } + const m3u8Data = await fetcher.text(ctx, playlistUrl, init); const heights = Array.from(m3u8Data.matchAll(/\d+x(\d+)|(\d+)p/g)) .map(heightMatch => heightMatch[1] ?? heightMatch[2])