mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
feat: add mobile Xtream service, data providers, and UI widgets for Live TV and Movies.
This commit is contained in:
1 parent
527582e21b
commit
a1b1363bc8
9 files changed
+875
-774
No files matched your search
@@ -30,7 +30,7 @@ class _MobileSeriesDetailScreenState
|
||||
model.SeriesInfo? _seriesInfo;
|
||||
bool _isLoading = true;
|
||||
String? _error;
|
||||
int _selectedSeason = 1;
|
||||
String _selectedSeason = "1";
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -64,8 +64,7 @@ class _MobileSeriesDetailScreenState
|
||||
_seriesInfo = info;
|
||||
_isLoading = false;
|
||||
if (_seriesInfo!.episodes.isNotEmpty) {
|
||||
final firstKey = _seriesInfo!.episodes.keys.first;
|
||||
_selectedSeason = int.tryParse(firstKey.toString()) ?? 1;
|
||||
_selectedSeason = _seriesInfo!.episodes.keys.first.toString();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -258,7 +257,7 @@ class _MobileSeriesDetailScreenState
|
||||
selected: isSelected,
|
||||
onSelected: (selected) {
|
||||
if (selected) {
|
||||
setState(() => _selectedSeason = int.tryParse(seasonNum.toString()) ?? 1);
|
||||
setState(() => _selectedSeason = seasonNum.toString());
|
||||
}
|
||||
},
|
||||
backgroundColor: isDark
|
||||
@@ -310,7 +309,7 @@ class _MobileSeriesDetailScreenState
|
||||
final watchHistory = ref.watch(mobileWatchHistoryProvider);
|
||||
final episodeKey = MobileWatchHistory.episodeKey(
|
||||
widget.series.seriesId,
|
||||
_selectedSeason,
|
||||
int.tryParse(_selectedSeason) ?? 1,
|
||||
episode.episodeNum,
|
||||
);
|
||||
final isWatched = watchHistory.isEpisodeWatched(episodeKey);
|
||||
|
||||
Reference in new issue
Block a user