mirror of
https://github.com/madari-media/madari-oss.git
synced 2026-05-12 09:10:38 +00:00
Update stremio_season_selector.dart
This commit is contained in:
parent
6f044446f9
commit
f66280299b
1 changed files with 5 additions and 7 deletions
|
|
@ -82,25 +82,23 @@ class _StremioItemSeasonSelectorState extends State<StremioItemSeasonSelector>
|
|||
|
||||
final result = await traktService!.getWatchedShowsWithEpisodes(widget.meta);
|
||||
watchedEpisodesBySeason.clear();
|
||||
print("Trakt Result: $result"); // Print the raw Trakt result
|
||||
|
||||
|
||||
for (final show in result) {
|
||||
print("Show Title: ${show.title}"); // Print the show title
|
||||
|
||||
if (show.episodes != null) {
|
||||
print("Episodes for ${show.title}:");
|
||||
|
||||
for (final episode in show.episodes!) {
|
||||
print(" - Season: ${episode.season}, Episode: ${episode.episode}, Watched At: ${episode.watchedAt}");
|
||||
|
||||
if (!watchedEpisodesBySeason.containsKey(episode.season)) {
|
||||
watchedEpisodesBySeason[episode.season] = {};
|
||||
}
|
||||
watchedEpisodesBySeason[episode.season]!.add(episode.episode);
|
||||
}
|
||||
} else {
|
||||
print("No episodes found for ${show.title}");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
print("Watched Episodes By Season: $watchedEpisodesBySeason"); // Print the final map
|
||||
setState(() {});
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue