mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
feat: implement RecordingsTab and EPG guide view for IPTV feature
This commit is contained in:
1 parent
2a5eb08807
commit
1e6d3741d1
2 files changed
+9
-39
No files matched your search
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"allow": [
|
||||||
|
"Bash(dart analyze:*)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,7 +7,6 @@ import '../../../core/models/iptv_models.dart';
|
|||||||
import '../../../core/models/playlist_config.dart';
|
import '../../../core/models/playlist_config.dart';
|
||||||
import '../providers/xtream_provider.dart';
|
import '../providers/xtream_provider.dart';
|
||||||
import '../providers/settings_provider.dart';
|
import '../providers/settings_provider.dart';
|
||||||
import '../screens/player_screen.dart';
|
|
||||||
|
|
||||||
// ═══════════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════════
|
||||||
// ENTRÉE — Onglet "Enregistrements"
|
// ENTRÉE — Onglet "Enregistrements"
|
||||||
@@ -50,7 +49,7 @@ class _RecordingsTabState extends State<RecordingsTab> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: _RecordingsListView(playlist: widget.playlist),
|
child: const _RecordingsListView(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -722,8 +721,7 @@ class _ProgrammeCard extends StatelessWidget {
|
|||||||
// ═══════════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
class _RecordingsListView extends StatefulWidget {
|
class _RecordingsListView extends StatefulWidget {
|
||||||
final PlaylistConfig playlist;
|
const _RecordingsListView();
|
||||||
const _RecordingsListView({required this.playlist});
|
|
||||||
@override
|
@override
|
||||||
State<_RecordingsListView> createState() => _RecordingsListViewState();
|
State<_RecordingsListView> createState() => _RecordingsListViewState();
|
||||||
}
|
}
|
||||||
@@ -779,31 +777,6 @@ class _RecordingsListViewState extends State<_RecordingsListView> {
|
|||||||
_fetchRecordings();
|
_fetchRecordings();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _playRecording(BuildContext context, Map<String, dynamic> rec) async {
|
|
||||||
final streamUrl = rec['stream_url'] as String? ?? '';
|
|
||||||
final title = rec['title'] as String? ?? 'Enregistrement';
|
|
||||||
|
|
||||||
if (streamUrl.isEmpty) {
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
|
||||||
const SnackBar(content: Text('URL du flux indisponible')),
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mounted) return;
|
|
||||||
Navigator.of(context).push(
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (ctx) => PlayerScreen(
|
|
||||||
streamId: streamUrl,
|
|
||||||
title: title,
|
|
||||||
playlist: widget.playlist,
|
|
||||||
streamType: StreamType.vod,
|
|
||||||
containerExtension: 'ts',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _showLogs(String id, String title) async {
|
Future<void> _showLogs(String id, String title) async {
|
||||||
try {
|
try {
|
||||||
final response = await http.get(Uri.parse('/api/recordings/logs/$id'));
|
final response = await http.get(Uri.parse('/api/recordings/logs/$id'));
|
||||||
@@ -1016,16 +989,6 @@ class _RecordingsListViewState extends State<_RecordingsListView> {
|
|||||||
rec['title'] ?? '',
|
rec['title'] ?? '',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (status == 'completed')
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.play_circle_outline,
|
|
||||||
color: Colors.greenAccent,
|
|
||||||
size: 20,
|
|
||||||
),
|
|
||||||
tooltip: 'Lecture',
|
|
||||||
onPressed: () => _playRecording(context, rec),
|
|
||||||
),
|
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.description_outlined,
|
Icons.description_outlined,
|
||||||
|
|||||||
Reference in new issue
Block a user