mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-17 04:09:03 +02:00
feat: add mobile-optimized IPTV player with HLS and MpegTS support
This commit is contained in:
1 parent
3c9a9c7be7
commit
fa6ae90d8d
38 files changed
+1280
-895
No files matched your search
@@ -29,8 +29,9 @@ class EpgApi {
|
||||
final playlist = await _getPlaylist(request);
|
||||
if (playlist == null) {
|
||||
return Response.forbidden(
|
||||
json.encode({'error': 'Playlist non trouvée'}),
|
||||
headers: {'Content-Type': 'application/json'});
|
||||
json.encode({'error': 'Playlist non trouvée'}),
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
);
|
||||
}
|
||||
|
||||
final dns = playlist.dns;
|
||||
@@ -43,7 +44,7 @@ class EpgApi {
|
||||
await http.get(Uri.parse(url)).timeout(const Duration(seconds: 60));
|
||||
Map<String, dynamic> epgData = {
|
||||
'channel_id': channelId,
|
||||
'programmes': []
|
||||
'programmes': [],
|
||||
};
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
@@ -72,8 +73,10 @@ class EpgApi {
|
||||
expiresAt: DateTime.now().add(const Duration(minutes: 30)),
|
||||
);
|
||||
|
||||
return Response.ok(jsonStr,
|
||||
headers: {'Content-Type': 'application/json', 'X-Cache': 'MISS'});
|
||||
return Response.ok(
|
||||
jsonStr,
|
||||
headers: {'Content-Type': 'application/json', 'X-Cache': 'MISS'},
|
||||
);
|
||||
} catch (e) {
|
||||
return Response.internalServerError(
|
||||
body: json.encode({'error': 'Erreur lors de la récupération EPG: $e'}),
|
||||
|
||||
Reference in new issue
Block a user