aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksooo <3226626+ksooo@users.noreply.github.com>2023-10-21 10:03:17 +0200
committerksooo <3226626+ksooo@users.noreply.github.com>2023-10-21 13:25:04 +0200
commit4c60ce3c17322e6a566f47e4769763f7b063437f (patch)
treedef0836dfde7a32325a89c3f3df092869fa023ae
parent66a03e8914c9547a2807c9ccd2f92ae0c04b0de9 (diff)
[PVR] Implement ListItem.IsPlaying for channels so that same channel contained in different groups is correctly handled.
-rw-r--r--xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp b/xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp
index 185e55165e..6d15b00826 100644
--- a/xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp
+++ b/xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp
@@ -1565,6 +1565,19 @@ bool CPVRGUIInfo::GetListItemAndPlayerBool(const CFileItem* item,
return true;
}
break;
+ case LISTITEM_ISPLAYING:
+ if (item->IsPVRChannel())
+ {
+ const std::shared_ptr<CPVRChannel> playingChannel{
+ CServiceBroker::GetPVRManager().PlaybackState()->GetPlayingChannel()};
+ if (playingChannel)
+ {
+ const std::shared_ptr<CPVRChannel> channel{item->GetPVRChannelInfoTag()};
+ bValue = (channel->StorageId() == playingChannel->StorageId());
+ return true;
+ }
+ }
+ break;
case MUSICPLAYER_CONTENT:
case VIDEOPLAYER_CONTENT:
if (item->IsPVRChannel())