Merge pull request #844 from candry7731/Add-Episode-Aired-Date-to-details
Add Aired Date to episode details
This commit is contained in:
commit
b07cebf603
|
@ -55,14 +55,20 @@ sub itemContentChanged()
|
|||
' Handle all "As Is" fields
|
||||
m.top.overhangTitle = itemData.name
|
||||
setFieldText("releaseYear", itemData.productionYear)
|
||||
setFieldText("officialRating", itemData.officialRating)
|
||||
setFieldText("overview", itemData.overview)
|
||||
|
||||
if itemData.officialRating <> invalid
|
||||
setFieldText("officialRating", itemData.officialRating)
|
||||
else
|
||||
m.top.findNode("infoGroup").removeChild(m.top.findNode("officialRating"))
|
||||
end if
|
||||
|
||||
if itemData.communityRating <> invalid
|
||||
setFieldText("communityRating", int(itemData.communityRating * 10) / 10)
|
||||
m.top.findNode("star").visible = "true"
|
||||
else
|
||||
' hide the star icon
|
||||
m.top.findNode("communityRatingGroup").visible = false
|
||||
m.top.findNode("infoGroup").removeChild(m.top.findNode("communityRatingGroup"))
|
||||
end if
|
||||
|
||||
if itemData.CriticRating <> invalid
|
||||
|
@ -86,6 +92,8 @@ sub itemContentChanged()
|
|||
|
||||
if itemData.genres.count() > 0
|
||||
setFieldText("genres", tr("Genres") + ": " + itemData.genres.join(", "))
|
||||
else
|
||||
m.top.findNode("details").removeChild(m.top.findNode("genres"))
|
||||
end if
|
||||
|
||||
' show tags if there are no genres to display
|
||||
|
@ -101,6 +109,8 @@ sub itemContentChanged()
|
|||
end for
|
||||
if directors.count() > 0
|
||||
setFieldText("director", tr("Director") + ": " + directors.join(", "))
|
||||
else
|
||||
m.top.findNode("details").removeChild(m.top.findNode("director"))
|
||||
end if
|
||||
|
||||
if get_user_setting("ui.details.hidetagline") = "false"
|
||||
|
@ -111,6 +121,15 @@ sub itemContentChanged()
|
|||
m.details.removeChild(m.tagline)
|
||||
end if
|
||||
|
||||
'set aired date if type is Episode
|
||||
if itemData.PremiereDate <> invalid and itemData.Type = "Episode"
|
||||
airDate = CreateObject("roDateTime")
|
||||
airDate.FromISO8601String(itemData.PremiereDate)
|
||||
m.top.findNode("aired").text = tr("Aired") + ": " + airDate.AsDateString("short-month-no-weekday")
|
||||
'remove movie release year label
|
||||
m.top.findNode("infoGroup").removeChild(m.top.findNode("releaseYear"))
|
||||
end if
|
||||
|
||||
setFavoriteColor()
|
||||
setWatchedColor()
|
||||
SetUpVideoOptions(itemData.mediaSources)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<Label id="runtime" />
|
||||
<Label id="officialRating" />
|
||||
<LayoutGroup id="communityRatingGroup" layoutDirection="horiz" itemSpacings="[-5]">
|
||||
<Poster id="star" uri="pkg:/images/sharp_star_white_18dp.png" height="32" width="32" blendColor="#cb272a" />
|
||||
<Poster id="star" uri="pkg:/images/sharp_star_white_18dp.png" height="32" width="32" blendColor="#cb272a" visible="false"/>
|
||||
<Label id="communityRating" />
|
||||
</LayoutGroup>
|
||||
<LayoutGroup layoutDirection="horiz" itemSpacings="[-5]" id="criticRatingGroup">
|
||||
|
@ -17,6 +17,7 @@
|
|||
<Label id="criticRatingLabel" />
|
||||
</LayoutGroup>
|
||||
<Label id="ends-at" />
|
||||
<Label id="aired" />
|
||||
</LayoutGroup>
|
||||
<Label id="genres" />
|
||||
<Label id="director" />
|
||||
|
|
|
@ -18,6 +18,12 @@ sub itemContentChanged()
|
|||
m.title.text = indexNumber + item.title
|
||||
m.overview.text = item.overview
|
||||
|
||||
if itemData.PremiereDate <> invalid
|
||||
airDate = CreateObject("roDateTime")
|
||||
airDate.FromISO8601String(itemData.PremiereDate)
|
||||
m.top.findNode("aired").text = tr("Aired") + ": " + airDate.AsDateString("short-month-no-weekday")
|
||||
end if
|
||||
|
||||
imageUrl = item.posterURL
|
||||
|
||||
if get_user_setting("ui.tvshows.blurunwatched") = "true"
|
||||
|
@ -47,7 +53,8 @@ sub itemContentChanged()
|
|||
m.top.findNode("star").visible = true
|
||||
m.top.findNode("communityRating").text = str(int(itemData.communityRating * 10) / 10)
|
||||
else
|
||||
m.top.findNode("star").visible = false
|
||||
|
||||
m.top.findnode("infoBar").removeChild(m.top.findnode("rating"))
|
||||
end if
|
||||
|
||||
videoIdx = invalid
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
<!-- Using poster of 1 length to get spacing. Not successful with adding translation to title -->
|
||||
<Poster id="null" height="1" />
|
||||
<ScrollingLabel id="title" font="font:MediumBoldSystemFont" maxWidth="950" />
|
||||
<LayoutGroup layoutDirection="horiz" itemSpacings="[20]">
|
||||
<LayoutGroup id="infoBar" layoutDirection="horiz" itemSpacings="[20]">
|
||||
<Label id="runtime" font="font:SmallestSystemFont" />
|
||||
<LayoutGroup layoutDirection="horiz" itemSpacings="[-5]">
|
||||
<LayoutGroup id="rating" layoutDirection="horiz" itemSpacings="[-5]">
|
||||
<Poster id="star" uri="pkg:/images/sharp_star_white_18dp.png" height="26" width="26" blendColor="#cb272a" />
|
||||
<Label id="communityRating" font="font:SmallestSystemFont" />
|
||||
</LayoutGroup>
|
||||
<Label id="endtime" font="font:SmallestSystemFont" />
|
||||
<Label id="aired" font="font:SmallestSystemFont" />
|
||||
</LayoutGroup>
|
||||
<Label id="overview" font="font:SmallestSystemFont" wrap="true" height="130" width="950" maxLines="3" ellipsizeOnBoundary="true"/>
|
||||
<LayoutGroup layoutDirection="horiz" itemSpacings="[15]">
|
||||
|
|
|
@ -17,14 +17,31 @@ sub itemContentChanged()
|
|||
|
||||
' Handle all "As Is" fields
|
||||
m.top.overhangTitle = itemData.name
|
||||
|
||||
'Check production year, if invalid remove label
|
||||
if itemData.productionYear <> invalid
|
||||
setFieldText("releaseYear", itemData.productionYear)
|
||||
else
|
||||
m.top.findNode("main_group").removeChild(m.top.findNode("releaseYear"))
|
||||
end if
|
||||
|
||||
'Check officialRating, if invalid remove label
|
||||
if itemData.officialRating <> invalid
|
||||
setFieldText("officialRating", itemData.officialRating)
|
||||
else
|
||||
m.top.findNode("main_group").removeChild(m.top.findNode("officialRating"))
|
||||
end if
|
||||
|
||||
'Check communityRating, if invalid remove label
|
||||
if itemData.communityRating <> invalid
|
||||
m.top.findNode("star").visible = true
|
||||
setFieldText("communityRating", int(itemData.communityRating * 10) / 10)
|
||||
else
|
||||
m.top.findNode("main_group").removeChild(m.top.findNode("communityRating"))
|
||||
m.top.findNode("main_group").removeChild(m.top.findNode("star"))
|
||||
m.top.findNode("star").visible = false
|
||||
end if
|
||||
|
||||
setFieldText("overview", itemData.overview)
|
||||
|
||||
|
||||
|
@ -32,11 +49,17 @@ sub itemContentChanged()
|
|||
setFieldText("runtime", stri(getRuntime()) + " mins")
|
||||
end if
|
||||
|
||||
'History feild is set via the function getHistory()
|
||||
setFieldText("history", getHistory())
|
||||
|
||||
'Check genres, if invalid remove label
|
||||
if itemData.genres.count() > 0
|
||||
setFieldText("genres", itemData.genres.join(", "))
|
||||
else
|
||||
m.top.findNode("main_group").removeChild(m.top.findNode("genres"))
|
||||
end if
|
||||
|
||||
'We don't display Directors in the show page. Might want to remove this.
|
||||
for each person in itemData.people
|
||||
if person.type = "Director"
|
||||
exit for
|
||||
|
@ -44,6 +67,8 @@ sub itemContentChanged()
|
|||
end for
|
||||
if itemData.taglines.count() > 0
|
||||
setFieldText("tagline", itemData.taglines[0])
|
||||
else
|
||||
m.top.findNode("main_group").removeChild(m.top.findNode("tagline"))
|
||||
end if
|
||||
end sub
|
||||
|
||||
|
@ -105,6 +130,7 @@ function getHistory() as string
|
|||
end if
|
||||
|
||||
if studio = invalid and airwords = invalid
|
||||
m.top.findNode("main_group").removeChild(m.top.findNode("history"))
|
||||
return ""
|
||||
end if
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<Label id="releaseYear" />
|
||||
<Label id="officialRating" />
|
||||
<LayoutGroup layoutDirection="horiz" itemSpacings="[3]">
|
||||
<Poster id="star" uri="pkg:/images/sharp_star_white_18dp.png" height="32" width="32" blendColor="#cb272a" />
|
||||
<Poster id="star" uri="pkg:/images/sharp_star_white_18dp.png" height="32" width="32" blendColor="#cb272a" visible="false" />
|
||||
<Label id="communityRating" />
|
||||
</LayoutGroup>
|
||||
</LayoutGroup>
|
||||
|
|
|
@ -850,6 +850,11 @@
|
|||
<translation>Unable to find any albums or songs belonging to this artist</translation>
|
||||
<extracomment>Popup message when we find no audio data for an artist</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>Aired</source>
|
||||
<translation>Aired</translation>
|
||||
<extracomment>Aired date label</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>Slideshow Off</source>
|
||||
<translation>Slideshow Off</translation>
|
||||
|
|
Loading…
Reference in New Issue
Block a user