Don't typecast invalid (#98)
This commit is contained in:
parent
edab57c45b
commit
819c89c3fa
|
@ -23,7 +23,7 @@ sub itemContentChanged()
|
|||
m.top.overhangTitle = itemData.name
|
||||
setFieldText("releaseYear", itemData.productionYear)
|
||||
setFieldText("officialRating", itemData.officialRating)
|
||||
setFieldText("communityRating", str(itemData.communityRating))
|
||||
setFieldText("communityRating", itemData.communityRating)
|
||||
setFieldText("overview", itemData.overview)
|
||||
|
||||
if type(itemData.RunTimeTicks) = "LongInteger"
|
||||
|
@ -61,6 +61,8 @@ sub setFieldText(field, value)
|
|||
' Handle non strings... Which _shouldn't_ happen, but hey
|
||||
if type(value) = "roInt" or type(value) = "Integer" then
|
||||
value = str(value)
|
||||
else if type(value) = "roFloat" or type(value) = "Float" then
|
||||
value = str(value)
|
||||
else if type(value) <> "roString" and type(value) <> "String" then
|
||||
value = ""
|
||||
end if
|
||||
|
|
|
@ -16,7 +16,7 @@ sub itemContentChanged()
|
|||
m.top.overhangTitle = itemData.name
|
||||
setFieldText("releaseYear", itemData.productionYear)
|
||||
setFieldText("officialRating", itemData.officialRating)
|
||||
setFieldText("communityRating", str(itemData.communityRating))
|
||||
setFieldText("communityRating", itemData.communityRating)
|
||||
setFieldText("overview", itemData.overview)
|
||||
|
||||
|
||||
|
@ -49,6 +49,8 @@ sub setFieldText(field, value)
|
|||
' Handle non strings... Which _shouldn't_ happen, but hey
|
||||
if type(value) = "roInt" or type(value) = "Integer" then
|
||||
value = str(value)
|
||||
else if type(value) = "roFloat" or type(value) = "Float" then
|
||||
value = str(value)
|
||||
else if type(value) <> "roString" and type(value) <> "String" then
|
||||
value = ""
|
||||
end if
|
||||
|
|
Loading…
Reference in New Issue
Block a user