diff --git a/components/ItemGrid/LoadVideoContentTask.bs b/components/ItemGrid/LoadVideoContentTask.bs index 4f30de6b..f5612fca 100644 --- a/components/ItemGrid/LoadVideoContentTask.bs +++ b/components/ItemGrid/LoadVideoContentTask.bs @@ -99,9 +99,17 @@ sub LoadItems_AddVideoContent(video as object, mediaSourceId as dynamic, audio_s if videotype = "episode" or videotype = "series" video.content.contenttype = "episode" - video.content.title = "S" + meta.json.ParentIndexNumber.toStr() + "E" + meta.json.IndexNumber.toStr() + " - " + meta.title + + " (" + meta.json.ProductionYear.ToStr() + ")" + if Type(meta.json.ParentIndexNumber) = "roInt" and Type(meta.json.IndexNumber) = "roInt" and Type(meta.json.ProductionYear) = "roInt" + video.content.title = "S" + meta.json.ParentIndexNumber.toStr() + " - E" + meta.json.IndexNumber.toStr() + " - " + meta.title + + " (" + meta.json.ProductionYear.ToStr() + ")" + else + video.content.title = meta.title + end if else - video.content.title = meta.title + " (" + meta.json.ProductionYear.ToStr() + ")" + if Type(meta.json.ProductionYear) = "roInt" + video.content.title = meta.title + " (" + meta.json.ProductionYear.ToStr() + ")" + else + video.content.title = meta.title + end if end if video.chapters = meta.json.Chapters