Skip to content

Commit

Permalink
[PlaylistPlayer] Resolve plugin paths to fill the item infotag
Browse files Browse the repository at this point in the history
  • Loading branch information
enen92 committed May 18, 2019
1 parent f563618 commit f5b5419
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xbmc/PlayListPlayer.cpp
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down

3 comments on commit f5b5419

@bigretromike
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure but it looks like you fix something that is eating me alive for 3 days now....
Any chance to backport this to 18.x ?

@enen92
Copy link
Member Author

@enen92 enen92 commented on f5b5419 Jun 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already backported: #16192

@bigretromike
Copy link
Contributor

@bigretromike bigretromike commented on f5b5419 Jun 5, 2019 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.