Skip to content

Commit

Permalink
fix crash on episode list when video codec is invalid. when invalid u…
Browse files Browse the repository at this point in the history
…se "N/A"
  • Loading branch information
cewert committed Nov 8, 2024
1 parent a316387 commit 77b92f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion components/tvshows/TVListDetails.bs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion locale/en_US/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 77b92f0

Please sign in to comment.