Hide any loaded movie data if filter returns no results
This commit is contained in:
parent
8e17e87d81
commit
083622ec22
|
@ -22,6 +22,7 @@ sub setupNodes()
|
|||
m.overhang = m.top.getScene().findNode("overhang")
|
||||
m.genreList = m.top.findNode("genrelist")
|
||||
m.infoGroup = m.top.findNode("infoGroup")
|
||||
m.star = m.top.findNode("star")
|
||||
end sub
|
||||
|
||||
sub init()
|
||||
|
@ -366,6 +367,24 @@ sub ItemDataLoaded(msg)
|
|||
m.Loading = false
|
||||
'If there are no items to display, show message
|
||||
if m.loadedItems = 0
|
||||
m.selectedMovieOverview.visible = false
|
||||
m.infoGroup.visible = false
|
||||
|
||||
m.movieLogo.visible = false
|
||||
m.movieLogo.uri = ""
|
||||
|
||||
m.selectedMovieName.visible = false
|
||||
|
||||
SetName("")
|
||||
SetOverview("")
|
||||
SetOfficialRating("")
|
||||
SetProductionYear("")
|
||||
setFieldText("runtime", "")
|
||||
setFieldText("communityRating", "")
|
||||
setFieldText("criticRatingLabel", "")
|
||||
m.criticRatingIcon.uri = ""
|
||||
m.star.uri = ""
|
||||
|
||||
m.emptyText.text = tr("NO_ITEMS").Replace("%1", m.top.parentItem.Type)
|
||||
m.emptyText.visible = true
|
||||
end if
|
||||
|
@ -443,6 +462,8 @@ sub onItemFocused()
|
|||
|
||||
itemData = m.selectedFavoriteItem.json
|
||||
|
||||
m.star.uri = "pkg:/images/sharp_star_white_18dp.png"
|
||||
|
||||
if isValid(itemData.communityRating)
|
||||
setFieldText("communityRating", int(itemData.communityRating * 10) / 10)
|
||||
m.communityRatingGroup.visible = true
|
||||
|
|
Loading…
Reference in New Issue
Block a user