diff --git a/Dockerfile b/Dockerfile index 427779f..295e906 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,8 +23,9 @@ RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o server cm FROM alpine:latest WORKDIR /app -# Install runtime dependencies (sqlite) -RUN apk add --no-cache sqlite ca-certificates tzdata +# Install runtime dependencies (sqlite + yt-dlp for video extraction fallback) +RUN apk add --no-cache sqlite ca-certificates tzdata python3 py3-pip && \ + pip3 install --break-system-packages yt-dlp # Copy backend binary COPY --from=backend-builder /app/backend/server . diff --git a/frontend-react/src/hooks/useWatchMovie.ts b/frontend-react/src/hooks/useWatchMovie.ts index 08fc881..9ee1ed9 100644 --- a/frontend-react/src/hooks/useWatchMovie.ts +++ b/frontend-react/src/hooks/useWatchMovie.ts @@ -32,7 +32,13 @@ export const useWatchMovie = (slug: string | undefined, episode: string | undefi try { const ep = movie.episodes?.find(e => e.number === currentEpisode); - if (ep && (ep.url.includes('.m3u8') || ep.url.includes('index.m3u8'))) { + // If no episode or no URL, don't try to extract — let WatchPage show "Coming Soon" + if (!ep?.url) { + setLoading(false); + return; + } + + if (ep.url.includes('.m3u8') || ep.url.includes('index.m3u8')) { setSource({ stream_url: ep.url, resolution: 'HD',