Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[Fix]Stop playback when next from last item in current playlist #15582
When user does "next" during playback of the last item of the current playlist then playback should stop. This was not happening, play continues and yet the item is undefined so no metadata or art is displayed on GUI or returned to JSON requests about the currently playing item. Once in this state "prev" does not goto the previous item in the playlist, instead play of that item restarts.
@ronie thanks for reporting here https://forum.kodi.tv/showthread.php?tid=341168&pid=2825962#pid2825962
This is a regression introduced in the major app changes of March 2018. Previously when the app processed
In many situations the player has stopped before
This also avoids changes in CApplication message handling which is desirable since it is considered "fragile" by other team members.
As discussed on slack. This is wrong as it adds a circular dependency from PlayListPlayer to Application. It furthermore hardcodes behaviour in the player itself.
As you send the message GUI_MSG_PLAYLISTPLAYER_STOPPED to the user of your Player, let the user, here application, handle it.
Should be enough as the user (I repeat: Application in that case) can care about behaviour and change it, e.g. handle messages like it wants.