feat: Add new UI components for IPTV movies and series, including mobile-specific tabs with search and pagination, and a series detail screen.

This commit is contained in:
Michael committed 2025-12-07 23:08:29 +01:00
1 parent 59bb26479e
commit 643bf7e761
5 files changed
+28 -4

No files matched your search

@@ -24,6 +24,30 @@ class MobileSeriesDetailScreen extends ConsumerStatefulWidget {
}
class _MobileSeriesDetailScreenState extends ConsumerState<MobileSeriesDetailScreen> {
SeriesInfo? _seriesInfo;
bool _isLoading = true;
String? _error;
int _selectedSeason = 1;
@override
void initState() {
super.initState();
_loadSeriesInfo();
}
String? _formatRating(String? rating) {
if (rating == null || rating.isEmpty) return null;
final value = double.tryParse(rating);
if (value != null) {
return value.toStringAsFixed(1);
}
return rating;
}
Future<void> _loadSeriesInfo() async {
try {
setState(() {
_isLoading = true;
_error = null;
});
@@ -252,7 +252,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
return MediaCard(
title: movie.name,
imageUrl: movie.streamIcon,
imageUrl: movie.streamIcon,
subtitle: movie.rating != null ? '${_formatRating(movie.rating)} ★' : null,
rating: _formatRating(movie.rating),
isWatched: isWatched,
@@ -252,7 +252,7 @@ class _MobileSeriesTabState extends ConsumerState<MobileSeriesTab> {
return MediaCard(
title: series.name,
imageUrl: series.cover,
imageUrl: series.cover,
subtitle: series.rating != null ? '${_formatRating(series.rating)} ★' : null,
rating: _formatRating(series.rating),
placeholderIcon: Icons.tv,