Skip to content

Commit

Permalink
Merge pull request xbmc#25663 from ksooo/pvr-providers-gui
Browse files Browse the repository at this point in the history
[Estuary][PVR][guiinfo] PVR Providers User Interface
  • Loading branch information
ksooo authored Aug 30, 2024
2 parents 55be1a8 + eaca754 commit 567207b
Show file tree
Hide file tree
Showing 54 changed files with 1,314 additions and 99 deletions.
7 changes: 5 additions & 2 deletions addons/resource.language.en_gb/resources/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -11722,7 +11722,10 @@ msgctxt "#19333"
msgid "Switched to channel for auto-closed PVR reminder for channel '{0:s}' at '{1:s}'"
msgstr ""

#. label for PVR backend number of channel providers in system information's PVR section
#. generic label for pvr providers used in different places
#: addons/skin.estuary/xml/DialogPVRInfo.xml
#: addons/skin.estuary/xml/Includes_PVR.xml
#: xbmc/pvr/filesystem/PVRGUIDirectory.cpp
#: xbmc/pvr/guilib/PVRGUIActionsDatabase.cpp
#: xbmc/windows/GUIWindowSystemInfo.cpp
msgctxt "#19334"
Expand Down Expand Up @@ -11807,7 +11810,7 @@ msgctxt "#19347"
msgid "None of the active PVR clients provide client-specific settings."
msgstr ""

#. label for 'by provider' sort method
#. generic label for a pvr provider used in different places
#: xbmc/pvr/windows/GUIViewStatePVR.cpp
#: xbmc/utils/SortUtils.cpp
msgctxt "#19348"
Expand Down
Binary file added addons/skin.estuary/media/DefaultPVRProvider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added addons/skin.estuary/media/DefaultPVRProviders.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion addons/skin.estuary/xml/DialogPVRInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<width>1050</width>
<height>425</height>
<align>justify</align>
<label>$INFO[ListItem.ChannelName,[B],[/B][CR]]$INFO[ListItem.Date,[COLOR grey]$LOCALIZE[552]:[/COLOR] ,[CR]]$INFO[ListItem.Duration,[COLOR grey]$LOCALIZE[180]:[/COLOR] ,[CR]]$VAR[RecordingSizeLabel]$VAR[PremieredLabel]$INFO[ListItem.Rating,[COLOR grey]$LOCALIZE[563]:[/COLOR] ,[CR]]$VAR[ExpirationDateTimeLabel]$VAR[PVRInstanceName,,[CR]]$INFO[ListItem.Genre,[COLOR grey]$LOCALIZE[515]: [/COLOR]][CR]$INFO[ListItem.ParentalRatingCode,[COLOR grey]$LOCALIZE[31017]: [/COLOR],[CR]]$INFO[ListItem.Writer,[COLOR grey]$LOCALIZE[20417]:[/COLOR] ,[CR]]$INFO[ListItem.Director,[COLOR grey]$LOCALIZE[20339]:[/COLOR] ,[CR]]$INFO[ListItem.Cast,[COLOR grey]$LOCALIZE[206]:[/COLOR] ,[CR]][CR]$INFO[ListItem.Plot]</label>
<label>$INFO[ListItem.ChannelName,[B],[/B][CR]]$INFO[ListItem.Date,[COLOR grey]$LOCALIZE[552]:[/COLOR] ,[CR]]$INFO[ListItem.Duration,[COLOR grey]$LOCALIZE[180]:[/COLOR] ,[CR]]$VAR[RecordingSizeLabel]$VAR[PremieredLabel]$INFO[ListItem.Rating,[COLOR grey]$LOCALIZE[563]:[/COLOR] ,[CR]]$VAR[ExpirationDateTimeLabel]$VAR[PVRInstanceName,,[CR]]$INFO[ListItem.MediaProviders,[COLOR grey]$LOCALIZE[19334]:[/COLOR] ,[CR]]$INFO[ListItem.Genre,[COLOR grey]$LOCALIZE[515]: [/COLOR]][CR]$INFO[ListItem.ParentalRatingCode,[COLOR grey]$LOCALIZE[31017]: [/COLOR],[CR]]$INFO[ListItem.Writer,[COLOR grey]$LOCALIZE[20417]:[/COLOR] ,[CR]]$INFO[ListItem.Director,[COLOR grey]$LOCALIZE[20339]:[/COLOR] ,[CR]]$INFO[ListItem.Cast,[COLOR grey]$LOCALIZE[206]:[/COLOR] ,[CR]][CR]$INFO[ListItem.Plot]</label>
<autoscroll time="3000" delay="4000" repeat="5000">Skin.HasSetting(AutoScroll)</autoscroll>
</control>
<control type="grouplist" id="9000">
Expand Down
2 changes: 1 addition & 1 deletion addons/skin.estuary/xml/Includes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@
<label>$INFO[Container.FolderName, / ]</label>
<include>BreadcrumbsLabel</include>
<visible>![Container.Content() + Window.IsActive(videos)]</visible>
<visible>![Window.IsActive(MyPVRChannels.xml) | Window.IsActive(MyPVRTimers.xml) | Window.IsActive(MyPVRRecordings.xml) | Window.IsActive(MyPVRSearch.xml)]</visible>
<visible>![Window.IsActive(MyPVRChannels.xml) | Window.IsActive(MyPVRTimers.xml) | Window.IsActive(MyPVRRecordings.xml) | Window.IsActive(MyPVRSearch.xml) | Window.IsActive(MyPVRProviders.xml)]</visible>
</control>
<control type="label">
<label>$INFO[Container.PluginCategory, / ]</label>
Expand Down
28 changes: 24 additions & 4 deletions addons/skin.estuary/xml/Includes_PVR.xml
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@
<top>465</top>
<width>830</width>
<bottom>list_bottom_offset</bottom>
<label>$VAR[PVRInstanceName,,[CR]]$VAR[FlagLabel,,[CR]]$INFO[ListItem.Genre,[COLOR grey]$LOCALIZE[515]:[/COLOR] ,[CR]]$INFO[ListItem.ParentalRatingCode,[COLOR grey]$LOCALIZE[31017]: [/COLOR],[CR]]$INFO[ListItem.TimerType,[COLOR grey]$LOCALIZE[803]:[/COLOR] ,[CR]]$VAR[RecordingSizeLabel]$VAR[ExpirationDateTimeLabel]$INFO[ListItem.Plot,[CR]]</label>
<label>$VAR[PVRInstanceName,,[CR]]$INFO[ListItem.MediaProviders,[COLOR grey]$LOCALIZE[19334]:[/COLOR] ,[CR]]$VAR[FlagLabel,,[CR]]$INFO[ListItem.Genre,[COLOR grey]$LOCALIZE[515]:[/COLOR] ,[CR]]$INFO[ListItem.ParentalRatingCode,[COLOR grey]$LOCALIZE[31017]: [/COLOR],[CR]]$INFO[ListItem.TimerType,[COLOR grey]$LOCALIZE[803]:[/COLOR] ,[CR]]$VAR[RecordingSizeLabel]$VAR[ExpirationDateTimeLabel]$INFO[ListItem.Plot,[CR]]</label>
<autoscroll delay="10000" time="3000" repeat="10000">Skin.HasSetting(AutoScroll)</autoscroll>
</control>
</control>
Expand All @@ -462,25 +462,45 @@
<orientation>vertical</orientation>
<focusedlayout height="100" width="780">
<control type="label">
<visible>!String.IsEqual(ListItem.ChannelName, ListItem.Label)</visible>
<left>10</left>
<height>90</height>
<width>830</width>
<aligny>center</aligny>
<label>$VAR[RecordingDateSizeLabel]$INFO[ListItem.Label]$INFO[ListItem.EpisodeName, (,)]</label>
<label>$VAR[RecordingDateSizeLabel]$INFO[ListItem.Label]$VAR[SeasonEpisodeLabel]$INFO[ListItem.EpisodeName, (,)]$INFO[ListItem.Property(totalcount), (, $LOCALIZE[31036])]</label>
<shadowcolor>text_shadow</shadowcolor>
</control>
<control type="label">
<visible>String.IsEqual(ListItem.ChannelName, ListItem.Label)</visible>
<left>10</left>
<height>90</height>
<width>830</width>
<aligny>center</aligny>
<label>[COLOR grey]$INFO[ListItem.ChannelName,,[CR]][/COLOR]$INFO[ListItem.EpgEventTitle]$VAR[SeasonEpisodeLabel]$INFO[ListItem.EpisodeName, (,)]</label>
<shadowcolor>text_shadow</shadowcolor>
</control>
</focusedlayout>
<itemlayout height="100" width="780">
<control type="label">
<visible>!String.IsEqual(ListItem.ChannelName, ListItem.Label)</visible>
<left>10</left>
<height>90</height>
<width>830</width>
<aligny>center</aligny>
<label>$VAR[RecordingDateSizeLabel]$INFO[ListItem.Label]$VAR[SeasonEpisodeLabel]$INFO[ListItem.EpisodeName, (,)]$INFO[ListItem.Property(totalcount), (, $LOCALIZE[31036])]</label>
<shadowcolor>text_shadow</shadowcolor>
</control>
<control type="label">
<visible>String.IsEqual(ListItem.ChannelName, ListItem.Label)</visible>
<left>10</left>
<height>90</height>
<width>830</width>
<aligny>center</aligny>
<label>$VAR[RecordingDateSizeLabel]$INFO[ListItem.Label]$INFO[ListItem.EpisodeName, (,)]</label>
<label>[COLOR grey]$INFO[ListItem.ChannelName,,[CR]][/COLOR]$INFO[ListItem.EpgEventTitle]$VAR[SeasonEpisodeLabel]$INFO[ListItem.EpisodeName, (,)]</label>
<shadowcolor>text_shadow</shadowcolor>
</control>
</itemlayout>
<content sortby="date" sortorder="$PARAM[folder_sortorder]">$INFO[ListItem.FilenameAndPath]</content>
<content sortby="$PARAM[folder_sortby]" sortorder="$PARAM[folder_sortorder]">$INFO[ListItem.FilenameAndPath]</content>
</control>
</control>
</control>
Expand Down
78 changes: 78 additions & 0 deletions addons/skin.estuary/xml/MyPVRProviders.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<window>
<defaultcontrol always="true">50</defaultcontrol>
<backgroundcolor>background</backgroundcolor>
<views>50</views>
<menucontrol>9000</menucontrol>
<controls>
<include>DefaultBackground</include>
<control type="group">
<animation effect="fade" start="100" end="0" time="200" tween="sine" condition="$EXP[infodialog_active]">Conditional</animation>
<control type="group">
<include>OpenClose_Left</include>
<control type="fixedlist" id="50">
<left>0</left>
<top>list_top_offset</top>
<right>918</right>
<bottom>list_bottom_offset</bottom>
<onleft>9000</onleft>
<onright>73</onright>
<onup>50</onup>
<ondown>50</ondown>
<movement>4</movement>
<focusposition>4</focusposition>
<pagecontrol>73</pagecontrol>
<scrolltime tween="cubic" easing="out">500</scrolltime>
<include content="PVRListItemLayouts">
<param name="list_id" value="50" />
<param name="label1" value="$INFO[ListItem.Label]" />
</include>
</control>
</control>
<control type="group">
<depth>DepthContentPanel</depth>
<include>OpenClose_Right</include>
<width>870</width>
<right>0</right>
<include content="ContentPanel">
<param name="left" value="-72" />
<param name="width" value="970" />
<param name="top" value="-20" />
<param name="flipx" value="true" />
</include>
<control type="scrollbar" id="73">
<left>-50</left>
<top>list_top_offset</top>
<width>12</width>
<bottom>list_bottom_offset</bottom>
<onleft>50</onleft>
<onright>50</onright>
<orientation>vertical</orientation>
<animation effect="zoom" start="100,100" end="50,100" center="-50,0" time="300" tween="sine" easing="inout" condition="!Control.HasFocus(73)">conditional</animation>
</control>
<include content="PVRInfoPanel">
<param name="folder_sortby" value="label" />
<param name="folder_sortorder" value="ascending" />
</include>
</control>
<include content="TopBar">
<param name="breadcrumbs_label" value="$VAR[BreadcrumbsPVRProvidersVar]" />
</include>
<include content="BottomBar">
<param name="info_visible" value="true" />
</include>
<control type="group">
<include>MediaMenuCommon</include>
<include>PVRSideBar</include>
</control>
</control>
<control type="label" id="29">
<font></font>
<include>HiddenObject</include>
</control>
<control type="label" id="30">
<font></font>
<include>HiddenObject</include>
</control>
</controls>
</window>
1 change: 1 addition & 0 deletions addons/skin.estuary/xml/MyPVRRecordings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<animation effect="zoom" start="100,100" end="50,100" center="-50,0" time="300" tween="sine" easing="inout" condition="!Control.HasFocus(73)">conditional</animation>
</control>
<include content="PVRInfoPanel">
<param name="folder_sortby" value="date" />
<param name="folder_sortorder" value="descending" />
</include>
</control>
Expand Down
1 change: 1 addition & 0 deletions addons/skin.estuary/xml/MyPVRTimers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<animation effect="zoom" start="100,100" end="50,100" center="-50,0" time="300" tween="sine" easing="inout" condition="!Control.HasFocus(73)">conditional</animation>
</control>
<include content="PVRInfoPanel">
<param name="folder_sortby" value="date" />
<param name="folder_sortorder" value="ascending" />
</include>
</control>
Expand Down
16 changes: 10 additions & 6 deletions addons/skin.estuary/xml/Variables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -511,25 +511,29 @@
<value>$LOCALIZE[3]</value>
</variable>
<variable name="BreadcrumbsPVRChannelsVar">
<value condition="Window.IsActive(TVChannels)">$LOCALIZE[19020] / $LOCALIZE[19019] / $INFO[Control.GetLabel(29)]</value>
<value>$LOCALIZE[19021] / $LOCALIZE[19019] / $INFO[Control.GetLabel(29)]</value>
<value condition="Window.IsActive(TVChannels)">$LOCALIZE[19020] / $LOCALIZE[19019] / $INFO[Control.GetLabel(29)]$INFO[Control.GetLabel(30), - ]</value>
<value>$LOCALIZE[19021] / $LOCALIZE[19019] / $INFO[Control.GetLabel(29)]$INFO[Control.GetLabel(30), - ]</value>
</variable>
<variable name="BreadcrumbsPVRGuideVar">
<value condition="Window.IsActive(TVGuide)">$LOCALIZE[19020] / $LOCALIZE[19069] / $INFO[Control.GetLabel(30)]</value>
<value>$LOCALIZE[19021] / $LOCALIZE[19069] / $INFO[Control.GetLabel(30)]</value>
</variable>
<variable name="BreadcrumbsPVRRecordingsVar">
<value condition="Window.IsActive(TVRecordings) + String.Contains(Control.GetLabel(7),*)">$LOCALIZE[19020] / $LOCALIZE[19017]$INFO[Control.GetLabel(30), / ] - $LOCALIZE[19179]</value>
<value condition="Window.IsActive(TVRecordings) + !String.Contains(Control.GetLabel(7),*)">$LOCALIZE[19020] / $LOCALIZE[19017]$INFO[Control.GetLabel(30), / ]</value>
<value condition="Window.IsActive(RadioRecordings) + String.Contains(Control.GetLabel(7),*)">$LOCALIZE[19021] / $LOCALIZE[19017]$INFO[Control.GetLabel(30), / ] - $LOCALIZE[19179]</value>
<value>$LOCALIZE[19021] / $LOCALIZE[19017]$INFO[Control.GetLabel(30), / ]</value>
<value condition="Window.IsActive(TVRecordings) + String.Contains(Control.GetLabel(7),*)">$LOCALIZE[19020] / $LOCALIZE[19017]$INFO[Control.GetLabel(30), / ]$INFO[Control.GetLabel(29), - ] - $LOCALIZE[19179]</value>
<value condition="Window.IsActive(TVRecordings) + !String.Contains(Control.GetLabel(7),*)">$LOCALIZE[19020] / $LOCALIZE[19017]$INFO[Control.GetLabel(30), / ]$INFO[Control.GetLabel(29), - ]</value>
<value condition="Window.IsActive(RadioRecordings) + String.Contains(Control.GetLabel(7),*)">$LOCALIZE[19021] / $LOCALIZE[19017]$INFO[Control.GetLabel(30), / ]$INFO[Control.GetLabel(29), - ] - $LOCALIZE[19179]</value>
<value>$LOCALIZE[19021] / $LOCALIZE[19017]$INFO[Control.GetLabel(30), / ]$INFO[Control.GetLabel(29), - ]</value>
</variable>
<variable name="BreadcrumbsPVRTimersVar">
<value condition="Window.IsActive(TVTimers)">$LOCALIZE[19020] / $LOCALIZE[19040]</value>
<value condition="Window.IsActive(RadioTimers)">$LOCALIZE[19021] / $LOCALIZE[19040]</value>
<value condition="Window.IsActive(TVTimerRules)">$LOCALIZE[19020] / $LOCALIZE[19138]$INFO[Control.GetLabel(29), / ]</value>
<value>$LOCALIZE[19021] / $LOCALIZE[19138]$INFO[Control.GetLabel(29), / ]</value>
</variable>
<variable name="BreadcrumbsPVRProvidersVar">
<value condition="Window.IsActive(TVProviders)">$LOCALIZE[19020] / $LOCALIZE[19334]$INFO[Control.GetLabel(29), / ]</value>
<value condition="Window.IsActive(RadioProviders)">$LOCALIZE[19021] / $LOCALIZE[19334]$INFO[Control.GetLabel(29), / ]</value>
</variable>
<variable name="BreadcrumbsPVRSearchVar">
<value condition="Window.IsActive(TVSearch)">$LOCALIZE[19020] / $LOCALIZE[137]$INFO[Control.GetLabel(29), / ]$INFO[Control.GetLabel(30), ]</value>
<value>$LOCALIZE[19021] / $LOCALIZE[137]$INFO[Control.GetLabel(29), / ]$INFO[Control.GetLabel(30), ]</value>
Expand Down
53 changes: 52 additions & 1 deletion xbmc/FileItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "pvr/guilib/PVRGUIActionsChannels.h"
#include "pvr/guilib/PVRGUIActionsEPG.h"
#include "pvr/guilib/PVRGUIActionsUtils.h"
#include "pvr/providers/PVRProvider.h"
#include "pvr/recordings/PVRRecording.h"
#include "pvr/timers/PVRTimerInfoTag.h"
#include "settings/AdvancedSettings.h"
Expand Down Expand Up @@ -299,6 +300,31 @@ CFileItem::CFileItem(const std::shared_ptr<CPVRTimerInfoTag>& timer)
FillInMimeType(false);
}

CFileItem::CFileItem(const std::string& path, const std::shared_ptr<CPVRProvider>& provider)
{
Initialize();

m_strPath = path;
m_bIsFolder = true;
m_pvrProviderInfoTag = provider;
SetLabel(provider->GetName());
m_bCanQueue = false;

// Set art
if (!provider->GetIconPath().empty())
SetArt("icon", provider->GetIconPath());
else
SetArt("icon", "DefaultPVRProvider.png");

if (!provider->GetThumbPath().empty())
SetArt("thumb", provider->GetThumbPath());

// Speedup FillInDefaultIcon()
SetProperty("icon_never_overlay", true);

FillInMimeType(false);
}

CFileItem::CFileItem(const CArtist& artist)
{
Initialize();
Expand Down Expand Up @@ -504,6 +530,7 @@ CFileItem& CFileItem::operator=(const CFileItem& item)
m_pvrChannelGroupMemberInfoTag = item.m_pvrChannelGroupMemberInfoTag;
m_pvrRecordingInfoTag = item.m_pvrRecordingInfoTag;
m_pvrTimerInfoTag = item.m_pvrTimerInfoTag;
m_pvrProviderInfoTag = item.m_pvrProviderInfoTag;
m_addonInfo = item.m_addonInfo;
m_eventLogEntry = item.m_eventLogEntry;

Expand Down Expand Up @@ -578,6 +605,7 @@ void CFileItem::Reset()
m_pvrChannelGroupMemberInfoTag.reset();
m_pvrRecordingInfoTag.reset();
m_pvrTimerInfoTag.reset();
m_pvrProviderInfoTag.reset();
delete m_pictureInfoTag;
m_pictureInfoTag=NULL;
delete m_gameInfoTag;
Expand Down Expand Up @@ -784,6 +812,9 @@ void CFileItem::ToSortable(SortItem &sortable, Field field) const
if (HasPVRChannelGroupMemberInfoTag())
GetPVRChannelGroupMemberInfoTag()->ToSortable(sortable, field);

if (HasPVRProviderInfoTag())
GetPVRProviderInfoTag()->ToSortable(sortable, field);

if (HasAddonInfo())
{
switch (field)
Expand Down Expand Up @@ -896,6 +927,11 @@ bool CFileItem::IsPVRTimer() const
return HasPVRTimerInfoTag();
}

bool CFileItem::IsPVRProvider() const
{
return HasPVRProviderInfoTag();
}

bool CFileItem::IsDeleted() const
{
if (HasPVRRecordingInfoTag())
Expand Down Expand Up @@ -945,7 +981,8 @@ bool CFileItem::IsPicture() const
return false;

if (HasPVRTimerInfoTag() || HasPVRChannelInfoTag() || HasPVRChannelGroupMemberInfoTag() ||
HasPVRRecordingInfoTag() || HasEPGInfoTag() || HasEPGSearchFilter())
HasPVRRecordingInfoTag() || HasEPGInfoTag() || HasEPGSearchFilter() ||
HasPVRProviderInfoTag())
return false;

if (!m_strPath.empty())
Expand Down Expand Up @@ -1240,6 +1277,10 @@ void CFileItem::FillInDefaultIcon()
// PVR deleted recording
SetArt("icon", "DefaultVideoDeleted.png");
}
else if (IsPVRProvider())
{
SetArt("icon", "DefaultPVRProvider.png");
}
else if (PLAYLIST::IsPlayList(*this) || PLAYLIST::IsSmartPlayList(*this))
{
SetArt("icon", "DefaultPlaylist.png");
Expand Down Expand Up @@ -1555,6 +1596,11 @@ void CFileItem::UpdateInfo(const CFileItem &item, bool replaceLabels /*=true*/)
m_pvrTimerInfoTag = item.m_pvrTimerInfoTag;
SetInvalid();
}
if (item.HasPVRProviderInfoTag())
{
m_pvrProviderInfoTag = item.m_pvrProviderInfoTag;
SetInvalid();
}
if (item.HasEPGInfoTag())
{
m_epgInfoTag = item.m_epgInfoTag;
Expand Down Expand Up @@ -1623,6 +1669,11 @@ void CFileItem::MergeInfo(const CFileItem& item)
m_pvrTimerInfoTag = item.m_pvrTimerInfoTag;
SetInvalid();
}
if (item.HasPVRProviderInfoTag())
{
m_pvrProviderInfoTag = item.m_pvrProviderInfoTag;
SetInvalid();
}
if (item.HasEPGInfoTag())
{
m_epgInfoTag = item.m_epgInfoTag;
Expand Down
11 changes: 11 additions & 0 deletions xbmc/FileItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class CPVRChannel;
class CPVRChannelGroupMember;
class CPVREpgInfoTag;
class CPVREpgSearchFilter;
class CPVRProvider;
class CPVRRecording;
class CPVRTimerInfoTag;
}
Expand Down Expand Up @@ -123,6 +124,7 @@ class CFileItem :
explicit CFileItem(const std::shared_ptr<PVR::CPVRChannelGroupMember>& channelGroupMember);
explicit CFileItem(const std::shared_ptr<PVR::CPVRRecording>& record);
explicit CFileItem(const std::shared_ptr<PVR::CPVRTimerInfoTag>& timer);
explicit CFileItem(const std::string& path, const std::shared_ptr<PVR::CPVRProvider>& provider);
explicit CFileItem(const CMediaSource& share);
explicit CFileItem(std::shared_ptr<const ADDON::IAddon> addonInfo);
explicit CFileItem(const EventPtr& eventLogEntry);
Expand Down Expand Up @@ -205,6 +207,7 @@ class CFileItem :
bool IsDeletedPVRRecording() const;
bool IsInProgressPVRRecording() const;
bool IsPVRTimer() const;
bool IsPVRProvider() const;
bool IsType(const char *ext) const;
bool IsVirtualDirectoryRoot() const;
bool IsReadOnly() const;
Expand Down Expand Up @@ -301,6 +304,13 @@ class CFileItem :
return m_pvrTimerInfoTag;
}

inline bool HasPVRProviderInfoTag() const { return m_pvrProviderInfoTag != nullptr; }

inline const std::shared_ptr<PVR::CPVRProvider> GetPVRProviderInfoTag() const
{
return m_pvrProviderInfoTag;
}

/*!
\brief return the item to play. will be almost 'this', but can be different (e.g. "Play recording" from PVR EPG grid window)
\return the item to play
Expand Down Expand Up @@ -622,6 +632,7 @@ class CFileItem :
std::shared_ptr<PVR::CPVRRecording> m_pvrRecordingInfoTag;
std::shared_ptr<PVR::CPVRTimerInfoTag> m_pvrTimerInfoTag;
std::shared_ptr<PVR::CPVRChannelGroupMember> m_pvrChannelGroupMemberInfoTag;
std::shared_ptr<PVR::CPVRProvider> m_pvrProviderInfoTag;
CPictureInfoTag* m_pictureInfoTag;
std::shared_ptr<const ADDON::IAddon> m_addonInfo;
KODI::GAME::CGameInfoTag* m_gameInfoTag;
Expand Down
Loading

0 comments on commit 567207b

Please sign in to comment.