mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-23 15:18:15 +02:00
feat: introduce XtreamServiceMobile for IPTV API interactions and DnsFallbackInterceptor for network robustness.
This commit is contained in:
1 parent
332295a57a
commit
2406b9b100
16 files changed
+1693
-399
No files matched your search
@@ -5,6 +5,7 @@ import 'package:google_fonts/google_fonts.dart';
|
||||
import '../../../providers/mobile_settings_providers.dart';
|
||||
import '../../../../core/providers/theme_provider.dart';
|
||||
import '../../../../core/theme/app_colors.dart';
|
||||
import '../screens/mobile_playlist_selection_screen.dart';
|
||||
|
||||
/// Simplified mobile settings tab - no auth, local storage only
|
||||
class MobileSettingsTab extends ConsumerStatefulWidget {
|
||||
@@ -167,6 +168,69 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.rocket_launch, color: AppColors.primary),
|
||||
title: const Text('Moteur Vidéo',
|
||||
style: TextStyle(color: AppColors.textPrimary)),
|
||||
subtitle: Text(
|
||||
settings.playerEngine == 'ultra' ? 'Ultra (MPV) - Puissant' : 'Lite (ExoPlayer) - Léger',
|
||||
style: const TextStyle(color: AppColors.textSecondary),
|
||||
),
|
||||
trailing: DropdownButton<String>(
|
||||
value: settings.playerEngine,
|
||||
dropdownColor: AppColors.surface,
|
||||
underline: const SizedBox(),
|
||||
icon: const Icon(Icons.arrow_drop_down, color: AppColors.primary),
|
||||
items: const [
|
||||
DropdownMenuItem(value: 'ultra', child: Text('Ultra', style: TextStyle(color: AppColors.textPrimary))),
|
||||
DropdownMenuItem(value: 'lite', child: Text('Lite', style: TextStyle(color: AppColors.textPrimary))),
|
||||
],
|
||||
onChanged: (val) {
|
||||
if (val != null) {
|
||||
ref.read(mobileSettingsProvider.notifier).setPlayerEngine(val);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
Divider(height: 1, color: AppColors.textSecondary.withOpacity(0.2)),
|
||||
SwitchListTile(
|
||||
title: const Text('Stats pour Nerds',
|
||||
style: TextStyle(color: AppColors.textPrimary)),
|
||||
subtitle: const Text('Infos techniques (FPS, Buffer)',
|
||||
style: TextStyle(color: AppColors.textSecondary, fontSize: 12)),
|
||||
secondary: const Icon(Icons.bug_report, color: AppColors.primary),
|
||||
value: settings.showDebugStats,
|
||||
onChanged: (val) => ref.read(mobileSettingsProvider.notifier).toggleShowDebugStats(val),
|
||||
activeColor: AppColors.primary,
|
||||
),
|
||||
Divider(height: 1, color: AppColors.textSecondary.withOpacity(0.2)),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.memory, color: AppColors.primary),
|
||||
title: const Text('Décodeur Vidéo',
|
||||
style: TextStyle(color: AppColors.textPrimary)),
|
||||
subtitle: Text(
|
||||
settings.decoderMode == 'auto' ? 'Automatique (Recommandé)' :
|
||||
settings.decoderMode == 'mediacodec' ? 'Matériel (Hardware)' : 'Logiciel (Software)',
|
||||
style: const TextStyle(color: AppColors.textSecondary),
|
||||
),
|
||||
trailing: DropdownButton<String>(
|
||||
value: settings.decoderMode,
|
||||
dropdownColor: AppColors.surface,
|
||||
underline: const SizedBox(),
|
||||
icon: const Icon(Icons.arrow_drop_down, color: AppColors.primary),
|
||||
items: const [
|
||||
DropdownMenuItem(value: 'auto', child: Text('Auto', style: TextStyle(color: AppColors.textPrimary))),
|
||||
DropdownMenuItem(value: 'mediacodec', child: Text('Hardware', style: TextStyle(color: AppColors.textPrimary))),
|
||||
DropdownMenuItem(value: 'no', child: Text('Software', style: TextStyle(color: AppColors.textPrimary))),
|
||||
],
|
||||
onChanged: (val) {
|
||||
if (val != null) {
|
||||
ref.read(mobileSettingsProvider.notifier).setDecoderMode(val);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
Divider(height: 1, color: AppColors.textSecondary.withOpacity(0.2)),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.speed, color: AppColors.primary),
|
||||
title: const Text('Mise en mémoire tampon (Cache)',
|
||||
@@ -259,8 +323,13 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
// Change Playlist
|
||||
InkWell(
|
||||
onTap: () {
|
||||
// Navigate back to playlist selection
|
||||
Navigator.of(context).popUntil((route) => route.isFirst);
|
||||
// Open Playlist Selection in Manage Mode
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const MobilePlaylistSelectionScreen(manageMode: true),
|
||||
),
|
||||
);
|
||||
},
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: Container(
|
||||
@@ -274,7 +343,7 @@ class _MobileSettingsTabState extends ConsumerState<MobileSettingsTab> {
|
||||
Icon(Icons.playlist_play, color: AppColors.textPrimary),
|
||||
SizedBox(width: 16),
|
||||
Text(
|
||||
'Changer de Playlist',
|
||||
'Gérer les Playlists',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.textPrimary,
|
||||
|
||||
Reference in new issue
Block a user