Skip to content

Commit

Permalink
Merge pull request #137 from jellyflix-app/fix-windows-download-issue
Browse files Browse the repository at this point in the history
fix: windows download issues
  • Loading branch information
jdk-21 authored Oct 23, 2024
2 parents 5ed5020 + 278036e commit 3dccd4e
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 79 deletions.
36 changes: 19 additions & 17 deletions lib/screens/player_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,25 @@ class _PlayerSreenState extends ConsumerState<PlayerScreen> {
});

player.stream.error.listen((error) {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: const Text("An error occured"),
content: Text(
"There was an error while loading the stream: $error"),
actions: [
TextButton(
onPressed: () {
context.pop();
},
child: const Text("OK"),
),
],
);
});
if (mounted) {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: const Text("An error occured"),
content: Text(
"There was an error while loading the stream: $error"),
actions: [
TextButton(
onPressed: () {
context.pop();
},
child: const Text("OK"),
),
],
);
});
}
throw Exception(error);
});
player.stream.completed.listen((completed) async {
Expand Down
Loading

0 comments on commit 3dccd4e

Please sign in to comment.