diff options
author | Dave Blake <oak99sky@yahoo.co.uk> | 2020-11-26 10:09:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-26 10:09:25 +0000 |
commit | bd0c9292ba31ee41dd33a0fc8a974eabef60c354 (patch) | |
tree | 57cfd264bdc76ec9a74c4628a1d9acdd12f8476e | |
parent | f2faea3a8b9930ae8e7870a1e374c40fb16988ae (diff) | |
parent | a4fd4645e104de75ee9d4573acc77c0bbba0596b (diff) |
Merge pull request #18823 from DaveTBlake/Mixedm3uPlayBuiltin
Fix PlayMedia builtin to play music files in mixed .m3u playlists
-rw-r--r-- | xbmc/interfaces/builtins/PlayerBuiltins.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/xbmc/interfaces/builtins/PlayerBuiltins.cpp b/xbmc/interfaces/builtins/PlayerBuiltins.cpp index 56e5f3faf1..fc5fece030 100644 --- a/xbmc/interfaces/builtins/PlayerBuiltins.cpp +++ b/xbmc/interfaces/builtins/PlayerBuiltins.cpp @@ -477,13 +477,19 @@ static int PlayMedia(const std::vector<std::string>& params) else items.Sort(SortByLabel, SortOrderAscending); - int playlist = containsVideo? PLAYLIST_VIDEO : PLAYLIST_MUSIC;; - if (containsMusic && containsVideo) //mixed content found in the folder + int playlist = containsVideo? PLAYLIST_VIDEO : PLAYLIST_MUSIC; + // Mixed playlist item played by music player, mixed content folder has music removed + if (containsMusic && containsVideo) { - for (int i = items.Size() - 1; i >= 0; i--) //remove music entries + if (item.IsPlayList()) + playlist = PLAYLIST_MUSIC; + else { - if (!items[i]->IsVideo()) - items.Remove(i); + for (int i = items.Size() - 1; i >= 0; i--) //remove music entries + { + if (!items[i]->IsVideo()) + items.Remove(i); + } } } |