From 3a5386622ba7f6e0302b7dcd916d07cd166835b5 Mon Sep 17 00:00:00 2001 From: Bas Rieter Date: Thu, 23 May 2019 23:58:51 +0200 Subject: [PlaylistPlayer] Resolve plugin paths to fill the item infotag --- xbmc/PlayListPlayer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xbmc/PlayListPlayer.cpp b/xbmc/PlayListPlayer.cpp index abb080c3a5..a556ac2c19 100644 --- a/xbmc/PlayListPlayer.cpp +++ b/xbmc/PlayListPlayer.cpp @@ -25,8 +25,10 @@ #include "interfaces/AnnouncementManager.h" #include "input/Key.h" #include "URL.h" +#include "utils/URIUtils.h" #include "messaging/ApplicationMessenger.h" #include "filesystem/VideoDatabaseFile.h" +#include "filesystem/PluginDirectory.h" #include "messaging/helpers/DialogOKHelper.h" #include "ServiceBroker.h" @@ -892,6 +894,12 @@ void PLAYLIST::CPlayListPlayer::OnApplicationMessage(KODI::MESSAGING::ThreadMess if (list->Size() == 1 && !(*list)[0]->IsPlayList()) { CFileItemPtr item = (*list)[0]; + // if the item is a plugin we need to resolve the URL to ensure the infotags are filled. + // resolve only for a maximum of 5 times to avoid deadlocks (plugin:// paths can resolve to plugin:// paths) + for (int i = 0; URIUtils::IsPlugin(item->GetDynPath()) && i < 5; ++i) + { + XFILE::CPluginDirectory::GetPluginResult(item->GetDynPath(), *item, true); + } if (item->IsAudio() || item->IsVideo()) Play(item, pMsg->strParam); else -- cgit v1.2.3