Skip to content

Commit

Permalink
Merge pull request #25142 from ksooo/estuary-pvr-guide-improvement
Browse files Browse the repository at this point in the history
[PVR][guilib][Estuary] Guide window improvement
  • Loading branch information
ksooo committed May 13, 2024
2 parents c6ce74b + 4bd3e88 commit 265f0a1
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 39 deletions.
47 changes: 47 additions & 0 deletions addons/skin.estuary/xml/Includes_PVR.xml
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,53 @@
<visible>!String.IsEmpty(PVR.ChannelNumberInput)</visible>
</control>
</include>
<include name="EpgEventDetails">
<definition>
<control type="group">
<top>0</top>
<left>350</left>
<right>$PARAM[right]</right>
<control type="label">
<width>100%</width>
<height>30</height>
<label>[B]$INFO[ListItem.EpgEventTitle][/B] $INFO[ListItem.Year,([COLOR grey],[/COLOR])]</label>
</control>
<control type="label">
<top>35</top>
<width>100%</width>
<height>30</height>
<label>$VAR[FlagDashLabel][I][COLOR grey]$VAR[SeasonEpisodeLabel][/COLOR]$INFO[ListItem.EpisodeName,[COLOR white],[/COLOR]][/I]</label>
</control>
</control>
<control type="textbox">
<left>350</left>
<top>85</top>
<right>$PARAM[right]</right>
<height>130</height>
<align>justify</align>
<label>$INFO[ListItem.Plot]</label>
<autoscroll delay="10000" time="3000" repeat="10000">Skin.HasSetting(AutoScroll)</autoscroll>
</control>
<control type="group">
<top>220</top>
<left>350</left>
<control type="label">
<top>0</top>
<width>25%</width>
<height>30</height>
<label>$INFO[ListItem.StartTime,[COLOR button_focus]$LOCALIZE[555]:[/COLOR] ]$INFO[ListItem.EndTime, - ]</label>
</control>
<control type="label">
<top>0</top>
<right>$PARAM[right]</right>
<width>75%</width>
<height>30</height>
<align>right</align>
<label>$INFO[ListItem.Genre,[COLOR button_focus]$LOCALIZE[515]:[/COLOR] ]</label>
</control>
</control>
</definition>
</include>
<include name="EpgGrid">
<definition>
<control type="epggrid" id="$PARAM[control_id]">
Expand Down
56 changes: 19 additions & 37 deletions addons/skin.estuary/xml/MyPVRGuide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,47 +178,29 @@
<height>250</height>
<aspectratio align="center" aligny="center">keep</aspectratio>
<fadetime>400</fadetime>
<texture>$INFO[ListItem.Icon]</texture>
<texture>$INFO[ListItem.ChannelLogo]</texture>
</control>
<control type="group">
<top>0</top>
<left>350</left>
<control type="label">
<width>70%</width>
<height>30</height>
<label>[B]$INFO[ListItem.EpgEventTitle][/B] $INFO[ListItem.Year,([COLOR grey],[/COLOR])]</label>
</control>
<control type="label">
<top>0</top>
<right>30</right>
<width>30%</width>
<height>30</height>
<align>right</align>
<label>[COLOR button_focus]$INFO[ListItem.StartTime,[COLOR grey]$LOCALIZE[555]:[/COLOR] ][/COLOR]$INFO[ListItem.EndTime,[COLOR button_focus] - ,[/COLOR]]</label>
</control>
<control type="label">
<top>35</top>
<width>60%</width>
<height>30</height>
<label>$VAR[FlagDashLabel][I][COLOR grey]$VAR[SeasonEpisodeLabel][/COLOR]$INFO[ListItem.EpisodeName,[COLOR white],[/COLOR]][/I]</label>
</control>
<control type="label">
<top>35</top>
<right>30</right>
<width>40%</width>
<height>30</height>
<align>right</align>
<label>$INFO[ListItem.Genre,[COLOR grey]$LOCALIZE[515]:[/COLOR] ]</label>
</control>
<visible>String.IsEmpty(ListItem.EpgEventIcon)</visible>
<include content="EpgEventDetails">
<param name="right" value="30"/>
</include>
</control>
<control type="textbox">
<left>350</left>
<top>85</top>
<control type="group">
<visible>!String.IsEmpty(ListItem.EpgEventIcon)</visible>
<include content="EpgEventDetails">
<param name="right" value="350"/>
</include>
</control>
<control type="image">
<top>10</top>
<right>30</right>
<height>170</height>
<align>justify</align>
<label>$INFO[ListItem.Plot]</label>
<autoscroll delay="10000" time="3000" repeat="10000">Skin.HasSetting(AutoScroll)</autoscroll>
<width>290</width>
<height>250</height>
<aspectratio align="center" aligny="center">keep</aspectratio>
<fadetime>400</fadetime>
<texture>$INFO[ListItem.EpgEventIcon]</texture>
<visible>!String.IsEmpty(ListItem.EpgEventIcon)</visible>
</control>
</control>
</control>
Expand Down
29 changes: 29 additions & 0 deletions xbmc/GUIInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2789,6 +2789,14 @@ const infomap musicpartymode[] = {{ "enabled", MUSICPM_ENABLED },
/// @return The channel name of the radio programme that's currently playing (PVR).
/// <p>
/// }
/// \table_row3{ <b>`MusicPlayer.ChannelLogo`</b>,
/// \anchor MusicPlayer_ChannelLogo
/// _string_,
/// @return The path for the logo of the currently playing radio channel\, if available (PVR).
/// <p><hr>
/// @skinning_v22 **[New Infolabel]** \link MusicPlayer_ChannelLogo `MusicPlayer.ChannelLogo`\endlink
/// <p>
/// }
/// \table_row3{ <b>`MusicPlayer.ChannelNumberLabel`</b>,
/// \anchor MusicPlayer_ChannelNumberLabel
/// _string_,
Expand Down Expand Up @@ -2878,6 +2886,7 @@ const infomap musicpartymode[] = {{ "enabled", MUSICPM_ENABLED },
/// \table_end
///
/// -----------------------------------------------------------------------------
// clang-format off
const infomap musicplayer[] = {{ "title", MUSICPLAYER_TITLE },
{ "album", MUSICPLAYER_ALBUM },
{ "artist", MUSICPLAYER_ARTIST },
Expand Down Expand Up @@ -2912,6 +2921,7 @@ const infomap musicplayer[] = {{ "title", MUSICPLAYER_TITLE },
{ "playcount", MUSICPLAYER_PLAYCOUNT },
{ "lastplayed", MUSICPLAYER_LASTPLAYED },
{ "channelname", MUSICPLAYER_CHANNEL_NAME },
{ "channellogo", MUSICPLAYER_CHANNEL_LOGO },
{ "channelnumberlabel", MUSICPLAYER_CHANNEL_NUMBER },
{ "channelgroup", MUSICPLAYER_CHANNEL_GROUP },
{ "dbid", MUSICPLAYER_DBID },
Expand All @@ -2923,6 +2933,7 @@ const infomap musicplayer[] = {{ "title", MUSICPLAYER_TITLE },
{ "totaldiscs", MUSICPLAYER_TOTALDISCS },
{ "station", MUSICPLAYER_STATIONNAME }
};
// clang-format on

/// \page modules__infolabels_boolean_conditions
/// \subsection modules__infolabels_boolean_conditions_Videoplayer Video player
Expand Down Expand Up @@ -3850,6 +3861,14 @@ const infomap musicplayer[] = {{ "title", MUSICPLAYER_TITLE },
/// @return The name of the currently tuned channel (PVR).
/// <p>
/// }
/// \table_row3{ <b>`VideoPlayer.ChannelLogo`</b>,
/// \anchor VideoPlayer_ChannelLogo
/// _string_,
/// @return The path for the logo of the currently playing TV channel\, if available (PVR).
/// <p><hr>
/// @skinning_v22 **[New Infolabel]** \link VideoPlayer_ChannelLogo `VideoPlayer.ChannelLogo`\endlink
/// <p>
/// }
/// \table_row3{ <b>`VideoPlayer.ChannelNumberLabel`</b>,
/// \anchor VideoPlayer_ChannelNumberLabel
/// _string_,
Expand Down Expand Up @@ -3996,6 +4015,7 @@ const infomap videoplayer[] = {{ "title", VIDEOPLAYER_TITLE },
{ "nextendtime", VIDEOPLAYER_NEXT_ENDTIME },
{ "nextduration", VIDEOPLAYER_NEXT_DURATION },
{ "channelname", VIDEOPLAYER_CHANNEL_NAME },
{ "channellogo", VIDEOPLAYER_CHANNEL_LOGO },
{ "channelnumberlabel", VIDEOPLAYER_CHANNEL_NUMBER },
{ "channelgroup", VIDEOPLAYER_CHANNEL_GROUP },
{ "hasepg", VIDEOPLAYER_HAS_EPG },
Expand Down Expand Up @@ -5973,6 +5993,14 @@ const infomap container_str[] = {{ "property", CONTAINER_PROPERTY },
/// @return The name of current selected TV channel in a container.
/// <p>
/// }
/// \table_row3{ <b>`ListItem.ChannelLogo`</b>,
/// \anchor ListItem_ChannelLogo
/// _string_,
/// @return The path for the logo of the currently selected radio or TV channel\, if available (PVR).
/// <p><hr>
/// @skinning_v22 **[New Infolabel]** \link ListItem_ChannelLogo `ListItem.ChannelLogo`\endlink
/// <p>
/// }
/// \table_row3{ <b>`ListItem.VideoCodec`</b>,
/// \anchor ListItem_VideoCodec
/// _string_,
Expand Down Expand Up @@ -7126,6 +7154,7 @@ const infomap listitem_labels[]= {{ "thumb", LISTITEM_THUMB },
{ "nextenddate", LISTITEM_NEXT_ENDDATE },
{ "nextduration", LISTITEM_NEXT_DURATION },
{ "channelname", LISTITEM_CHANNEL_NAME },
{ "channellogo", LISTITEM_CHANNEL_LOGO },
{ "channelnumberlabel", LISTITEM_CHANNEL_NUMBER },
{ "channelgroup", LISTITEM_CHANNEL_GROUP },
{ "hasepg", LISTITEM_HAS_EPG },
Expand Down
7 changes: 7 additions & 0 deletions xbmc/guilib/guiinfo/GUIInfoLabels.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@
#define MUSICPLAYER_CONTENT 246
#define MUSICPLAYER_ISMULTIDISC 247

// More Musicplayer infolabels
#define MUSICPLAYER_CHANNEL_LOGO 248

// Videoplayer infolabels
#define VIDEOPLAYER_HDR_TYPE 249
// Keep videoplayer infolabels that work with offset and position together
Expand Down Expand Up @@ -318,6 +321,9 @@
#define RETROPLAYER_STRETCH_MODE 331
#define RETROPLAYER_VIDEO_ROTATION 332

// More PVR infolabels
#define VIDEOPLAYER_CHANNEL_LOGO 333

#define CONTAINER_HAS_PARENT_ITEM 341
#define CONTAINER_CAN_FILTER 342
#define CONTAINER_CAN_FILTERADVANCED 343
Expand Down Expand Up @@ -981,6 +987,7 @@ static constexpr unsigned int SYSTEM_LOCALE = 1012;
#define LISTITEM_HASVIDEOEXTRAS (LISTITEM_START + 216)
#define LISTITEM_PVR_CLIENT_NAME (LISTITEM_START + 217)
#define LISTITEM_PVR_INSTANCE_NAME (LISTITEM_START + 218)
#define LISTITEM_CHANNEL_LOGO (LISTITEM_START + 219)

#define LISTITEM_END (LISTITEM_START + 2500)

Expand Down
22 changes: 20 additions & 2 deletions xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem* item,
case LISTITEM_CHANNEL_NAME:
strValue = timer->ChannelName();
return true;
case LISTITEM_CHANNEL_LOGO:
strValue = timer->ChannelIcon();
return true;
case LISTITEM_PVR_CLIENT_NAME:
strValue = CServiceBroker::GetPVRManager().GetClient(timer->ClientID())->GetClientName();
return true;
Expand Down Expand Up @@ -485,7 +488,6 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem* item,
if (recording->HasExpirationTime())
{
strValue = GetAsLocalizedTimeString(recording->ExpirationTimeAsLocalTime());
;
return true;
}
break;
Expand Down Expand Up @@ -523,6 +525,18 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem* item,
}
break;
}
case VIDEOPLAYER_CHANNEL_LOGO:
case LISTITEM_CHANNEL_LOGO:
{
const std::shared_ptr<const CPVRChannelGroupMember> groupMember =
CServiceBroker::GetPVRManager().Get<PVR::GUI::Channels>().GetChannelGroupMember(*item);
if (groupMember)
{
strValue = groupMember->Channel()->IconPath();
return true;
}
break;
}
case LISTITEM_ICON:
if (recording->ClientIconPath().empty() && recording->ClientThumbnailPath().empty() &&
// Only use a fallback if there is more than a single provider available
Expand Down Expand Up @@ -815,13 +829,17 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem* item,
if (!strValue.empty())
return true;
}
// fall-thru is intended
[[fallthrough]];
}
case VIDEOPLAYER_CHANNEL_NAME:
case LISTITEM_CHANNEL_NAME:
strValue = channel->ChannelName();
return true;
case MUSICPLAYER_CHANNEL_LOGO:
case VIDEOPLAYER_CHANNEL_LOGO:
case LISTITEM_CHANNEL_LOGO:
strValue = channel->IconPath();
return true;
case MUSICPLAYER_CHANNEL_NUMBER:
case VIDEOPLAYER_CHANNEL_NUMBER:
case LISTITEM_CHANNEL_NUMBER:
Expand Down

0 comments on commit 265f0a1

Please sign in to comment.