Fix TypeScript unknown stream type that broke Dokploy master-api build.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
4c91b692d2
commit
bc63ec11bb
1 changed files with 4 additions and 4 deletions
|
|
@ -107,14 +107,14 @@ export async function getViewerIptvCategories(viewerId: string, config: Config)
|
|||
|
||||
// Categorieën + (korte) zenderlijst parallel — categorieën nooit laten falen op trage streams
|
||||
const [catsRaw, streamsRaw] = await Promise.all([
|
||||
xt.client.getLiveCategories().catch(() => []),
|
||||
xt.client.getLiveCategories().catch(() => [] as Awaited<ReturnType<typeof xt.client.getLiveCategories>>),
|
||||
Promise.race([
|
||||
xt.client.getLiveStreams().catch(() => []),
|
||||
new Promise<unknown[]>((resolve) => setTimeout(() => resolve([]), 6_000)),
|
||||
xt.client.getLiveStreams().catch(() => [] as XtreamLiveStream[]),
|
||||
new Promise<XtreamLiveStream[]>((resolve) => setTimeout(() => resolve([]), 6_000)),
|
||||
]),
|
||||
]);
|
||||
const cats = Array.isArray(catsRaw) ? catsRaw : [];
|
||||
const streams = Array.isArray(streamsRaw) ? streamsRaw : [];
|
||||
const streams: XtreamLiveStream[] = Array.isArray(streamsRaw) ? streamsRaw : [];
|
||||
|
||||
const counts = new Map<string, number>();
|
||||
for (const s of streams) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue