Fix PlayMedia builtin for smart playlists and playlists #16327
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PlayMedia
builtin is broken in v18 when called for a playlist or smart playlist that needs to be recursively expanded into actual media items e.g. a smart playlist of artist or albums. Reported in https://forum.kodi.tv/showthread.php?tid=344892This regression was initially introduced by #11747 that ensured individual items are played with a playlist. It overlooked that item.IsVideo() returns true for .m3u and .xsp files and thus passed them to
CPlayListPlayer::Play
, which is unable to expand the .xsp file into the individual items to be queued, as if they were a single media file. Then #14183 attempted to fix the consequences - PlayMedia was not playing smart playlists and simple playlists are played as a single huge item. However this fix does not work for all smart playlists, they are not fully expanded andCPlayListPlayer::Play
can not handle lists of artists or albums.This fix restores the
PlayMedia
functionality for playlists and smartplaylists.