aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas Rieter <basrieter@gmail.com>2019-05-23 23:58:51 +0200
committerBas Rieter <basrieter@gmail.com>2019-05-23 23:58:51 +0200
commit3a5386622ba7f6e0302b7dcd916d07cd166835b5 (patch)
treef46d9f40a520dd5b405872e66c14da44b4d09c93
parente9c1414200224247f2b68f3d1560c41e2b8ef1d3 (diff)
[PlaylistPlayer] Resolve plugin paths to fill the item infotag
-rw-r--r--xbmc/PlayListPlayer.cpp8
1 files changed, 8 insertions, 0 deletions
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