Skip to content

Commit b38c4bb

Browse files
committed
Update code docs
1 parent 9a86cca commit b38c4bb

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

docs/components_movies_MovieDetails.bs.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,14 @@
270270
defaults = new VideoDefaults(itemData)
271271

272272
defaultAudioStream = defaults.getDefaultAudioStream()
273+
if not isValid(defaultAudioStream) then return
273274

274-
m.top.selectedAudioStreamIndex = defaultAudioStream.index
275-
setFieldText("audio_codec", tr("Audio") + ": " + defaultAudioStream.displayTitle)
275+
if isValid(defaultAudioStream.index)
276+
m.top.selectedAudioStreamIndex = defaultAudioStream.index
277+
end if
278+
if isValid(defaultAudioStream.displayTitle)
279+
setFieldText("audio_codec", tr("Audio") + ": " + defaultAudioStream.displayTitle)
280+
end if
276281
end sub
277282

278283
sub setFieldText(field, value)

0 commit comments

Comments
 (0)