fix crash on episode list when video codec is invalid. when invalid use "N/A"

This commit is contained in:
Charles Ewert 2024-11-08 18:14:08 -05:00
parent a316387974
commit 77b92f0081
2 changed files with 12 additions and 2 deletions

View File

@ -108,7 +108,12 @@ sub itemContentChanged()
if isValid(itemData.MediaSources)
for i = 0 to itemData.MediaSources.Count() - 1
if item.selectedVideoStreamId = itemData.MediaSources[i].id and isValid(itemData.MediaSources[i].MediaStreams[0])
m.videoCodec.text = tr("Video") + ": " + itemData.MediaSources[i].MediaStreams[0].DisplayTitle
m.videoCodec.text = tr("Video") + ": "
if isValid(itemData.MediaSources[i].MediaStreams[0].DisplayTitle)
m.videoCodec.text = m.videoCodec.text + itemData.MediaSources[i].MediaStreams[0].DisplayTitle
else
m.videoCodec.text = m.videoCodec.text + tr("N/A")
end if
SetupAudioDisplay(itemData.MediaSources[i].MediaStreams, item.selectedAudioStreamIndex)
exit for
end if

View File

@ -1326,5 +1326,10 @@
<translation>Special</translation>
<extracomment>Special episode of a TV Show</extracomment>
</message>
<message>
<source>N/A</source>
<translation>N/A</translation>
<extracomment>Abbreviation for not available</extracomment>
</message>
</context>
</TS>
</TS>