Skip to content

Commit

Permalink
Merge pull request xbmc#23972 from ksooo/fix-jsonrpc-pvr-playback-2
Browse files Browse the repository at this point in the history
[interfaces] Fix PVR channel playback from remote app 'favourites'
  • Loading branch information
ksooo authored Oct 22, 2023
2 parents b5d8762 + 2614b6b commit d92683f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xbmc/PlayListPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ void PLAYLIST::CPlayListPlayer::OnApplicationMessage(KODI::MESSAGING::ThreadMess
{
return;
}
if (!item->IsPVR() && (item->IsAudio() || item->IsVideo()))
if (item->IsAudio() || item->IsVideo())
Play(item, pMsg->strParam);
else
g_application.PlayMedia(*item, pMsg->strParam, playlistId);
Expand Down
7 changes: 7 additions & 0 deletions xbmc/interfaces/json-rpc/PlayerOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "settings/Settings.h"
#include "settings/SettingsComponent.h"
#include "utils/MathUtils.h"
#include "utils/URIUtils.h"
#include "utils/Variant.h"
#include "video/VideoDatabase.h"

Expand Down Expand Up @@ -897,6 +898,12 @@ JSONRPC_STATUS CPlayerOperations::Open(const std::string &method, ITransportLaye

return StartSlideshow("", false, optionShuffled.isBoolean() && optionShuffled.asBoolean());
}
else if (list.Size() == 1 && (URIUtils::IsPVRChannel(list[0]->GetPath()) ||
URIUtils::IsPVRRecording(list[0]->GetPath())))
{
if (!CServiceBroker::GetPVRManager().Get<PVR::GUI::Playback>().PlayMedia(*list[0]))
return FailedToExecute;
}
else
{
std::string playername;
Expand Down
2 changes: 1 addition & 1 deletion xbmc/interfaces/json-rpc/schema/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
JSONRPC_VERSION 13.3.0
JSONRPC_VERSION 13.3.1

0 comments on commit d92683f

Please sign in to comment.