mirror of
https://github.com/SrIzan10/hctv.git
synced 2026-06-06 00:56:56 +00:00
chore: make sure channel is not live already
This commit is contained in:
@@ -28,6 +28,7 @@ export async function POST(request: NextRequest) {
|
||||
owner: {
|
||||
include: { ban: true },
|
||||
},
|
||||
streamInfo: true,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -47,6 +48,10 @@ export async function POST(request: NextRequest) {
|
||||
}
|
||||
}
|
||||
|
||||
if (channel?.streamInfo[0].isLive) {
|
||||
return new Response('stream already live', { status: 403 });
|
||||
}
|
||||
|
||||
return new Response('youre in yay', { status: 200 });
|
||||
}
|
||||
} else if (action === 'read' && protocol === 'hls') {
|
||||
|
||||
@@ -7,8 +7,6 @@ import {
|
||||
MediaLoadingIndicator,
|
||||
MediaControlBar,
|
||||
MediaPlayButton,
|
||||
MediaSeekBackwardButton,
|
||||
MediaSeekForwardButton,
|
||||
MediaMuteButton,
|
||||
MediaVolumeRange,
|
||||
MediaFullscreenButton,
|
||||
|
||||
Reference in New Issue
Block a user