mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-24 07:28:05 +02:00
feat: add mobile movies and series tabs for IPTV content display
This commit is contained in:
1 parent
d1fbfe0f1e
commit
ac30bd98b4
7 files changed
+67
-31
No files matched your search
@@ -131,6 +131,15 @@ class _MoviesTabState extends ConsumerState<MoviesTab> {
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
void _playMovie(Movie movie) {
|
||||
ref.read(watchHistoryProvider.notifier).markMovieWatched(movie.streamId);
|
||||
|
||||
@@ -167,7 +176,7 @@ class _MoviesTabState extends ConsumerState<MoviesTab> {
|
||||
id: m.streamId,
|
||||
title: m.name,
|
||||
imageUrl: m.streamIcon ?? '',
|
||||
subtitle: m.rating != null ? '${m.rating} ★' : null,
|
||||
subtitle: m.rating != null ? '${_formatRating(m.rating)} ★' : null,
|
||||
onMoreInfo: () {
|
||||
_playMovie(m);
|
||||
},
|
||||
@@ -283,8 +292,9 @@ class _MoviesTabState extends ConsumerState<MoviesTab> {
|
||||
return MediaCard(
|
||||
title: movie.name,
|
||||
imageUrl: movie.streamIcon,
|
||||
subtitle: movie.rating != null ? '${movie.rating} ★' : null,
|
||||
rating: movie.rating,
|
||||
imageUrl: movie.streamIcon,
|
||||
subtitle: movie.rating != null ? '${_formatRating(movie.rating)} ★' : null,
|
||||
rating: _formatRating(movie.rating),
|
||||
isWatched: isWatched,
|
||||
onTap: () => _playMovie(movie),
|
||||
onLongPress: () {
|
||||
|
||||
Reference in new issue
Block a user