aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/resource.language.en_gb/resources/strings.po6
-rw-r--r--addons/skin.estuary/media/icons/pvr/premiere.pngbin0 -> 756 bytes
-rw-r--r--addons/skin.estuary/xml/DialogPVRInfo.xml2
-rw-r--r--addons/skin.estuary/xml/Includes_PVR.xml28
-rw-r--r--addons/skin.estuary/xml/Variables.xml4
-rw-r--r--xbmc/GUIInfoManager.cpp11
-rw-r--r--xbmc/guilib/guiinfo/GUIInfoLabels.h1
-rw-r--r--xbmc/pvr/PVRGUIInfo.cpp15
8 files changed, 60 insertions, 7 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 1347dd015d..3bf06af49f 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -3774,7 +3774,11 @@ msgctxt "#841"
msgid "Only this"
msgstr ""
-#empty string with id 842
+#. Label for a first aired TV show
+#: addons/skin.estuary/xml/DialogPVRInfo.xml
+msgctxt "#842"
+msgid "New!"
+msgstr ""
#. Label for a context menu entry to activate a currently inactive timer
#: xbmc/pvr/PVRContextMenus.cpp
diff --git a/addons/skin.estuary/media/icons/pvr/premiere.png b/addons/skin.estuary/media/icons/pvr/premiere.png
new file mode 100644
index 0000000000..4c6c11d8fb
--- /dev/null
+++ b/addons/skin.estuary/media/icons/pvr/premiere.png
Binary files differ
diff --git a/addons/skin.estuary/xml/DialogPVRInfo.xml b/addons/skin.estuary/xml/DialogPVRInfo.xml
index 9f3fe7e1f6..80914a1c6b 100644
--- a/addons/skin.estuary/xml/DialogPVRInfo.xml
+++ b/addons/skin.estuary/xml/DialogPVRInfo.xml
@@ -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]]$INFO[ListItem.Premiered,[COLOR grey]$LOCALIZE[20416]:[/COLOR] ,[CR]]$INFO[ListItem.Rating,[COLOR grey]$LOCALIZE[563]:[/COLOR] ,[CR]]$VAR[ExpirationDateTimeLabel]$INFO[ListItem.Genre,[COLOR grey]$LOCALIZE[515]:[/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[PremieredLabel]$INFO[ListItem.Rating,[COLOR grey]$LOCALIZE[563]:[/COLOR] ,[CR]]$VAR[ExpirationDateTimeLabel]$INFO[ListItem.Genre,[COLOR grey]$LOCALIZE[515]:[/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">
diff --git a/addons/skin.estuary/xml/Includes_PVR.xml b/addons/skin.estuary/xml/Includes_PVR.xml
index 4d063a32a0..bbe54bfc53 100644
--- a/addons/skin.estuary/xml/Includes_PVR.xml
+++ b/addons/skin.estuary/xml/Includes_PVR.xml
@@ -461,11 +461,21 @@
<label>$INFO[ListItem.Label]</label>
</control>
<control type="image">
+ <visible>ListItem.IsPremiere</visible>
<left>6</left>
<top>35</top>
- <width>20</width>
- <height>20</height>
+ <width>16</width>
+ <height>16</height>
+ <aspectratio>keep</aspectratio>
+ <texture colordiffuse="button_focus">icons/pvr/premiere.png</texture>
+ </control>
+ <control type="image">
+ <left>6</left>
+ <top>35</top>
+ <width>16</width>
+ <height>16</height>
<texture>$VAR[PVRTimerIcon]</texture>
+ <animation effect="slide" start="0,0" end="19,0" condition="ListItem.IsPremiere">Conditional</animation>
</control>
</itemlayout>
<focusedlayout height="62" width="60">
@@ -498,11 +508,21 @@
<label>$INFO[ListItem.Label]</label>
</control>
<control type="image">
+ <visible>ListItem.IsPremiere</visible>
+ <left>6</left>
+ <top>35</top>
+ <width>16</width>
+ <height>16</height>
+ <aspectratio>keep</aspectratio>
+ <texture colordiffuse="button_focus">icons/pvr/premiere.png</texture>
+ </control>
+ <control type="image">
<left>6</left>
<top>35</top>
- <width>20</width>
- <height>20</height>
+ <width>16</width>
+ <height>16</height>
<texture>$VAR[PVRTimerIcon]</texture>
+ <animation effect="slide" start="0,0" end="19,0" condition="ListItem.IsPremiere">Conditional</animation>
</control>
</focusedlayout>
</control>
diff --git a/addons/skin.estuary/xml/Variables.xml b/addons/skin.estuary/xml/Variables.xml
index ab9bae788e..a1c1f5f5c2 100644
--- a/addons/skin.estuary/xml/Variables.xml
+++ b/addons/skin.estuary/xml/Variables.xml
@@ -447,6 +447,10 @@
<value condition="String.IsEmpty(ListItem.EpisodeName)">$INFO[ListItem.Season,S]$INFO[ListItem.Episode,E]</value>
<value>$INFO[ListItem.Season,S]$INFO[ListItem.Episode,E,: ]</value>
</variable>
+ <variable name="PremieredLabel">
+ <value condition="!String.IsEmpty(ListItem.Premiered) + ListItem.IsPremiere">[COLOR grey]$LOCALIZE[20416]:[/COLOR] $INFO[ListItem.Premiered] [B]([COLOR button_focus]$LOCALIZE[842][/COLOR])[/B][CR]</value>
+ <value>$INFO[ListItem.Premiered,[COLOR grey]$LOCALIZE[20416]:[/COLOR] ,[CR]]</value>
+ </variable>
<variable name="ExpirationDateTimeLabel">
<value condition="!String.IsEmpty(ListItem.ExpirationDate)">[COLOR grey]$LOCALIZE[19299]:[/COLOR] $INFO[ListItem.ExpirationDate] $INFO[ListItem.ExpirationTime][CR]</value>
</variable>
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp
index a1a150094c..855f61f368 100644
--- a/xbmc/GUIInfoManager.cpp
+++ b/xbmc/GUIInfoManager.cpp
@@ -5717,6 +5717,14 @@ const infomap container_str[] = {{ "property", CONTAINER_PROPERTY },
/// @skinning_v19 **[New Infolabel]** \link ListItem_CurrentItem `ListItem.CurrentItem`\endlink
/// <p>
/// }
+/// \table_row3{ <b>`ListItem.IsPremiere`</b>,
+/// \anchor ListItem_IsPremiere
+/// _boolean_,
+/// @return **True** if the item is a premiere (for example, a Live TV show that will be first aired).
+/// <p><hr>
+/// @skinning_v19 **[New Infolabel]** \link ListItem_IsPremiere `ListItem.IsPremiere`\endlink
+/// <p>
+/// }
/// \table_end
///
/// -----------------------------------------------------------------------------
@@ -5908,7 +5916,8 @@ const infomap listitem_labels[]= {{ "thumb", LISTITEM_THUMB },
{ "art", LISTITEM_ART },
{ "property", LISTITEM_PROPERTY },
{ "parentalrating", LISTITEM_PARENTAL_RATING },
- { "currentitem", LISTITEM_CURRENTITEM }
+ { "currentitem", LISTITEM_CURRENTITEM },
+ { "ispremiere", LISTITEM_IS_PREMIERE },
};
/// \page modules__infolabels_boolean_conditions
diff --git a/xbmc/guilib/guiinfo/GUIInfoLabels.h b/xbmc/guilib/guiinfo/GUIInfoLabels.h
index de027949b9..e961707093 100644
--- a/xbmc/guilib/guiinfo/GUIInfoLabels.h
+++ b/xbmc/guilib/guiinfo/GUIInfoLabels.h
@@ -877,6 +877,7 @@
#define LISTITEM_ISPLAYABLE (LISTITEM_START + 186)
#define LISTITEM_FILENAME_NO_EXTENSION (LISTITEM_START + 187)
#define LISTITEM_CURRENTITEM (LISTITEM_START + 188)
+#define LISTITEM_IS_PREMIERE (LISTITEM_START + 189)
#define LISTITEM_END (LISTITEM_START + 2500)
diff --git a/xbmc/pvr/PVRGUIInfo.cpp b/xbmc/pvr/PVRGUIInfo.cpp
index ff940861ae..d294d20853 100644
--- a/xbmc/pvr/PVRGUIInfo.cpp
+++ b/xbmc/pvr/PVRGUIInfo.cpp
@@ -1246,6 +1246,21 @@ bool CPVRGUIInfo::GetListItemAndPlayerBool(const CFileItem *item, const CGUIInfo
return true;
}
break;
+ case LISTITEM_IS_PREMIERE:
+ if (item->IsEPG())
+ {
+ const std::shared_ptr<CPVREpgInfoTag> epgTag = item->GetEPGInfoTag();
+ const CDateTime firstAired = epgTag->FirstAiredAsUTC();
+ const CDateTime start = epgTag->StartAsUTC();
+ if (firstAired.IsValid() && start.IsValid())
+ {
+ bValue = firstAired.GetYear() == start.GetYear() &&
+ firstAired.GetMonth() == start.GetMonth() &&
+ firstAired.GetDay() == start.GetDay();
+ return true;
+ }
+ }
+ break;
case MUSICPLAYER_CONTENT:
case VIDEOPLAYER_CONTENT:
if (item->IsPVRChannel())