Fix a regression were we accidentally reset our current MediaPlayer

Fixes #418
This commit is contained in:
tzugen 2021-04-17 19:56:48 +02:00
parent 731447fda5
commit 116307df56
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
1 changed files with 2 additions and 1 deletions

View File

@ -438,7 +438,8 @@ class LocalMediaPlayer(
try {
val file = downloadFile.completeOrPartialFile
if (nextMediaPlayer != null) {
// Release the media player if it is not our active player
if (nextMediaPlayer != null && nextMediaPlayer != mediaPlayer) {
nextMediaPlayer!!.setOnCompletionListener(null)
nextMediaPlayer!!.release()
nextMediaPlayer = null