Misc fixes for syncService, remux and proxy

This commit is contained in:
Trevor Mears
2026-01-04 00:18:58 -08:00
parent 9256883aa6
commit ca87a5f143
3 changed files with 19 additions and 31 deletions
+3 -7
View File
@@ -336,13 +336,9 @@ class SyncService {
async syncM3u(source) {
console.log(`[Sync] Fetching M3U playlist for ${source.name}`);
// Fetch and parse using existing parser
// We use fetch directly here to get the stream/text
const response = await fetch(source.url);
if (!response.ok) throw new Error(`Failed to fetch M3U: ${response.status}`);
const text = await response.text();
const { channels, groups } = await m3uParser.parse(text);
// Use the streaming parser directly to avoid loading entire file into memory
// This prevents OOM crashes on large playlists (100MB+)
const { channels, groups } = await m3uParser.fetchAndParse(source.url);
console.log(`[Sync] M3U Parsed: ${channels.length} channels, ${groups.length} groups`);