mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-19 05:06:21 +02:00
feat: add IPTV data models and application color palette
This commit is contained in:
1 parent
e823086f58
commit
2d6def1f91
4 files changed
+76
-25
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user