feat: add IPTV data models and application color palette

This commit is contained in:
Michael committed 2025-12-06 23:51:43 +01:00
1 parent 0f5830eabb
commit f8bc8c791f
4 files changed
+76 -25

No files matched your search

+12 -2
View File
@@ -159,15 +159,25 @@ class EpgEntry {
return EpgEntry(
id: json['id']?.toString() ?? '',
epgId: json['epg_id']?.toString() ?? '',
title: json['title']?.toString() ?? '',
title: _decodeBase64(json['title']?.toString()),
lang: json['lang']?.toString() ?? '',
start: json['start']?.toString() ?? '',
end: json['end']?.toString() ?? '',
description: json['description']?.toString() ?? '',
description: _decodeBase64(json['description']?.toString()),
channelId: json['channel_id']?.toString() ?? '',
);
}
static String _decodeBase64(String? text) {
if (text == null || text.isEmpty) return '';
try {
final bytes = base64Decode(text);
return utf8.decode(bytes, allowMalformed: true);
} catch (_) {
return text;
}
}
/// Calculate progress percentage for current program
double getProgress() {
try {