resolve merge conflicts in tv page (merge password + quality/subtitle features)

This commit is contained in:
2026-07-12 03:41:20 +02:00
parent 8051ab58c0
commit f2f56b7143
2 changed files with 4 additions and 5 deletions

View File

@@ -89,7 +89,6 @@ function TvPageContent() {
error: broadcastError,
} = useCurrentBroadcast(channel?.id ?? "", passwords.channelPassword);
// blockPassword derived from broadcast.slot.id after broadcast loads
const blockPassword = passwords.getBlockPassword(broadcast?.slot.id);
const { data: epgSlots } = useEpg(

View File

@@ -132,10 +132,10 @@ export function useStreamUrl(
slotId: string | undefined,
channelPassword?: string,
blockPassword?: string,
quality?: string,
bitrateBps?: number,
) {
return useQuery({
queryKey: ["stream-url", channelId, slotId, channelPassword, blockPassword, quality],
queryKey: ["stream-url", channelId, slotId, channelPassword, blockPassword, bitrateBps],
queryFn: async (): Promise<string | null> => {
const params = new URLSearchParams();
if (token) params.set("token", token);
@@ -151,8 +151,8 @@ export function useStreamUrl(
const msg = body?.error ?? `Stream resolve failed: ${res.status}`;
throw new Error(msg);
}
const { url } = await res.json();
return url as string;
const { url } = (await res.json()) as { url: string };
return bitrateBps ? `${url}&VideoBitRate=${bitrateBps}` : url;
},
enabled: !!channelId && !!slotId,
staleTime: Infinity,