IPTV / fix_format.js
Hamza-Alobeidli's picture
Upload 8009 files
a2f457e verified
Raw History Blame Contribute Delete
316 Bytes
import fs from 'fs';
let content = fs.readFileSync('App.tsx', 'utf8');
// Replace hardcoded 'm3u8' with format setting
content = content.replace(/'m3u8'/g, "(typeof window !== 'undefined' ? localStorage.getItem('hydra_stream_format') || '.m3u8' : '.m3u8').replace('.', '')");
fs.writeFileSync('App.tsx', content);