Refactored code to use sqlite for channel, epg and vod data

This commit is contained in:
Trevor Mears
2026-01-03 21:07:18 -08:00
parent ec814be3dd
commit 8805ddbc13
14 changed files with 2065 additions and 530 deletions
+11 -9
View File
@@ -89,19 +89,21 @@ async function parse(input) {
let currentInfo = null;
let currentGroup = null;
let inputStream;
let lines;
if (typeof input === 'string') {
inputStream = Readable.from([input]);
// Handle string input directly
lines = input.split(/\r?\n/);
} else {
inputStream = input;
// Handle stream input
const rl = readline.createInterface({
input: input,
crlfDelay: Infinity
});
lines = rl;
}
const rl = readline.createInterface({
input: inputStream,
crlfDelay: Infinity
});
for await (const line of rl) {
for await (const line of lines) {
const trimmed = line.trim();
if (!trimmed) continue;