Fix a regression were we accidentally reset our current MediaPlayer
Fixes #418
This commit is contained in:
parent
731447fda5
commit
116307df56
|
@ -438,7 +438,8 @@ class LocalMediaPlayer(
|
||||||
try {
|
try {
|
||||||
val file = downloadFile.completeOrPartialFile
|
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!!.setOnCompletionListener(null)
|
||||||
nextMediaPlayer!!.release()
|
nextMediaPlayer!!.release()
|
||||||
nextMediaPlayer = null
|
nextMediaPlayer = null
|
||||||
|
|
Loading…
Reference in New Issue