mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-22 22:48:04 +02:00
feat: implement mobile live TV tab with channel browsing, search, and a dedicated player screen supporting channel zapping.
This commit is contained in:
1 parent
12b799a7fd
commit
4d1e08148b
4 files changed
+136
-32
No files matched your search
@@ -245,7 +245,8 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
return _MobileChannelTile(
|
||||
channel: channel,
|
||||
playlist: widget.playlist,
|
||||
onTap: () => _playChannel(context, channel),
|
||||
onTap: () => _playChannel(
|
||||
context, channel, displayedChannels),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -258,7 +259,8 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
);
|
||||
}
|
||||
|
||||
void _playChannel(BuildContext context, Channel channel) {
|
||||
void _playChannel(
|
||||
BuildContext context, Channel channel, List<Channel> channels) {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => MobilePlayerScreen(
|
||||
@@ -266,6 +268,7 @@ class _MobileLiveTVTabState extends ConsumerState<MobileLiveTVTab> {
|
||||
title: channel.name,
|
||||
playlist: widget.playlist,
|
||||
streamType: StreamType.live,
|
||||
channels: channels,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -139,7 +139,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
return originalUrl;
|
||||
}
|
||||
|
||||
void _playMovie(Movie movie) {
|
||||
void _playMovie(Movie movie, List<Movie> movies) {
|
||||
ref.read(watchHistoryProvider.notifier).markMovieWatched(movie.streamId);
|
||||
|
||||
Navigator.push(
|
||||
@@ -151,6 +151,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
playlist: widget.playlist,
|
||||
streamType: StreamType.vod,
|
||||
containerExtension: movie.containerExtension ?? 'mp4',
|
||||
channels: movies, // Pass list for zapping
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -180,7 +181,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
title: m.name,
|
||||
imageUrl: _getProxiedImageUrl(m.streamIcon, ref),
|
||||
subtitle: m.rating != null ? '${_formatRating(m.rating)} ★' : null,
|
||||
onMoreInfo: () => _playMovie(m),
|
||||
onMoreInfo: () => _playMovie(m, displayMovies),
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
@@ -259,7 +260,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
onTap: (item) {
|
||||
final movie = _movies
|
||||
.firstWhere((element) => element.streamId == item.id);
|
||||
_playMovie(movie);
|
||||
_playMovie(movie, _movies);
|
||||
},
|
||||
),
|
||||
),
|
||||
@@ -283,7 +284,7 @@ class _MobileMoviesTabState extends ConsumerState<MobileMoviesTab> {
|
||||
final isWatched = watchHistory.isMovieWatched(movie.streamId);
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => _playMovie(movie),
|
||||
onTap: () => _playMovie(movie, displayMovies),
|
||||
onLongPress: () {
|
||||
ref
|
||||
.read(watchHistoryProvider.notifier)
|
||||
|
||||
Reference in new issue
Block a user