feat(epg): update interfaces to match epg-parser v0.4.0

This commit is contained in:
4gray committed 2025-10-23 21:53:24 +02:00
1 parent 94e8d76a36
commit 0ec25115e0
4 files changed
+31 -10

No files matched your search

+1
View File
@@ -1,6 +1,7 @@
export * from './lib/channel.interface';
export * from './lib/channel.model';
export * from './lib/constants';
export * from './lib/epg-channel-with-programs.interface';
export * from './lib/epg-channel.model';
export * from './lib/epg-item.interface';
export * from './lib/epg-program.model';
@@ -0,0 +1,17 @@
import { EpgChannel } from './epg-channel.model';
import { EpgProgram } from './epg-program.model';
/**
* EPG Channel with associated programs
*/
export interface EpgChannelWithPrograms extends EpgChannel {
programs: EpgProgram[];
}
/**
* EPG Data structure
*/
export interface EpgData {
channels: EpgChannel[];
programs: EpgProgram[];
}
@@ -1,6 +1,9 @@
/**
* EPG Channel interface compatible with epg-parser v0.4.0
*/
export interface EpgChannel {
id: string;
name: string;
icon: string[];
displayName: { lang: string; value: string }[];
icon: { src: string; width?: number; height?: number }[];
url: string[];
}
@@ -1,20 +1,20 @@
/**
* EPG Program interface compatible with epg-parser v0.4.0
* Note: start/stop are ISO strings, date is string instead of array
*/
export interface EpgProgram {
start: string;
stop: string;
start: string; // ISO string
stop: string; // ISO string
channel: string;
title: { lang: string; value: string }[];
desc: { lang: string; value: string }[];
category: { lang: string; value: string }[];
date: any[];
date: string; // Changed from array to string in v0.4.0
episodeNum: any[];
previouslyShown: any[];
subtitles: any[];
icon: any[];
icon: { src: string; width?: number; height?: number }[];
rating: { system: string; value: string }[];
credits: any[];
audio: any[];
_attributes: {
start: string;
stop: string;
};
}