Skip to content
Snippets Groups Projects
Commit 74e7f6b2 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Fix crash on playback error

parent cd55bb56
No related branches found
No related tags found
No related merge requests found
......@@ -520,9 +520,6 @@ public class PlaybackService extends MediaBrowserServiceCompat{
executeUpdateProgress();
break;
case MediaPlayer.Event.EncounteredError:
showToast(getString(
R.string.invalid_location,
playlistManager.getCurrentMedia().getLocation()), Toast.LENGTH_SHORT);
executeUpdate();
executeUpdateProgress();
break;
......
......@@ -665,7 +665,12 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
next()
}
}
MediaPlayer.Event.EncounteredError -> next()
MediaPlayer.Event.EncounteredError -> {
service.showToast(service.getString(
R.string.invalid_location,
getCurrentMedia()?.getLocation() ?: ""), Toast.LENGTH_SHORT)
next()
}
}
service.onMediaPlayerEvent(event)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment