ensure vars are valid - fix crashlog line 80

This commit is contained in:
Charles Ewert 2023-03-03 20:38:21 -05:00
parent 45209b148e
commit cc1e3be6b2
2 changed files with 8 additions and 3 deletions

View File

@ -83,7 +83,11 @@ sub itemContentChanged()
else if itemData.type = "Episode"
m.itemPoster.uri = itemData.PosterUrl
m.itemIcon.uri = itemData.iconUrl
m.itemText.text = itemData.json.SeriesName + " - " + itemData.Title
if isValid(itemData?.json?.SeriesName)
m.itemText.text = itemData.json.SeriesName + " - " + itemData.Title
else
m.itemText.text = itemData.Title
end if
else if itemData.type = "MusicArtist"
m.itemPoster.uri = itemData.PosterUrl
m.itemText.text = itemData.Title

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<component name="GridItem" extends="Group">
<children>
<maskGroup id="posterMask" maskUri="pkg:/images/postermask.png" scaleRotateCenter="[145, 212.5]" scale="[0.85,0.85]">
@ -20,4 +20,5 @@
</interface>
<script type="text/brightscript" uri="GridItem.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
</component>
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
</component>