diff --git a/components/history/PosterImage.tsx b/components/history/PosterImage.tsx
index 84059b5..d03133a 100644
--- a/components/history/PosterImage.tsx
+++ b/components/history/PosterImage.tsx
@@ -2,7 +2,7 @@
* PosterImage - Video poster with fallback handling
*/
-import Image from 'next/image';
+
import { Icons } from '@/components/ui/Icon';
interface PosterImageProps {
@@ -15,12 +15,10 @@ export function PosterImage({ poster, title, progress }: PosterImageProps) {
return (
{poster ? (
- {
const target = e.currentTarget as HTMLImageElement;
target.style.display = 'none';
diff --git a/lib/api/parsers.ts b/lib/api/parsers.ts
index 3899b45..33badfe 100644
--- a/lib/api/parsers.ts
+++ b/lib/api/parsers.ts
@@ -16,9 +16,11 @@ export function parseEpisodes(playUrl: string): Episode[] {
return episodes.map((episode, index) => {
const [name, url] = episode.split('$');
+ // Clean up URL: remove double slashes but keep protocol (http:// or https://)
+ const cleanUrl = (url || '').replace(/([^:])\/\//g, '$1/');
return {
name: name || `Episode ${index + 1}`,
- url: url || '',
+ url: cleanUrl,
index,
};
});
diff --git a/lib/utils/segmentDownloader.ts b/lib/utils/segmentDownloader.ts
index 6ed7a1a..2f4934d 100644
--- a/lib/utils/segmentDownloader.ts
+++ b/lib/utils/segmentDownloader.ts
@@ -14,7 +14,7 @@ interface DownloadQueueOptions {
videoUrl?: string; // The m3u8 URL for metadata tracking
}
-const CONCURRENCY = 1000;
+const CONCURRENCY = 5;
const TIMEOUT_MS = 15000;
const CACHE_NAME = 'video-cache-v1';