From 156d6b738165932bb2738996c919105ed94affeb Mon Sep 17 00:00:00 2001 From: NenoR96 Date: Mon, 7 Mar 2022 14:40:47 +0100 Subject: [PATCH] fix: play next item looping wrong item --- widget/controllers/widget.nowplaying.controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/controllers/widget.nowplaying.controller.js b/widget/controllers/widget.nowplaying.controller.js index 835dd71..770d917 100644 --- a/widget/controllers/widget.nowplaying.controller.js +++ b/widget/controllers/widget.nowplaying.controller.js @@ -231,7 +231,7 @@ */ //var first = true; var ready=false, setOder=false, first=false, open=true; - audioPlayer.onEvent(function (e) { + var mediaListener = audioPlayer.onEvent(function (e) { switch (e.event) { case 'play': NowPlaying.playing = true; @@ -308,6 +308,7 @@ NowPlaying.finished=true; } else NowPlaying.finished=false; } + mediaListener.clear(); break; case 'pause': NowPlaying.playing = false;