temp: pass random param

There are some channels returning 304, and they can't stream without this param
This commit is contained in:
Thomas Zarebczan 2022-03-23 14:48:45 -04:00
parent 192e1d4923
commit aeb475ec2e
No known key found for this signature in database
GPG key ID: 767B41E1BB7346F2
2 changed files with 2 additions and 2 deletions

View file

@ -97,7 +97,7 @@ export const fetchLiveChannels = async (): Promise<LivestreamInfo> => {
*/
export const fetchLiveChannel = async (channelId: string): Promise<LiveChannelStatus> => {
const newApiEndpoint = LIVESTREAM_LIVE_API;
const newApiResponse = await fetch(`${newApiEndpoint}/${channelId}`);
const newApiResponse = await fetch(`${newApiEndpoint}/${channelId}?1`);
const newApiData = (await newApiResponse.json()).data;
const isLive = newApiData.live;

View file

@ -46,7 +46,7 @@ export const killStream = async (channelId: string, channelName: string) => {
export const isLiveStreaming = async (channelId: string): Promise<boolean> => {
try {
const response = await fetch(`${LIVESTREAM_LIVE_API}/${channelId}`);
const response = await fetch(`${LIVESTREAM_LIVE_API}/${channelId}?1`);
const stream = await response.json();
return stream.data?.live;
} catch {