Skip to content

Commit

Permalink
Fix video codec display when video is not mediastream 0
Browse files Browse the repository at this point in the history
Fixes #40
  • Loading branch information
1hitsong committed Sep 20, 2024
1 parent 52993b7 commit 9ad8563
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/tvshows/TVListDetails.bs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "pkg:/source/utils/misc.bs"
import "pkg:/source/utils/config.bs"
import "pkg:/source/utils/misc.bs"

sub init()
m.title = m.top.findNode("title")
Expand Down Expand Up @@ -104,8 +104,13 @@ sub itemContentChanged()
m.videoCodec.visible = false
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
if item.selectedVideoStreamId = itemData.MediaSources[i].id and isValidAndNotEmpty(itemData.MediaSources[i].MediaStreams)
for j = 0 to itemData.MediaSources[i].MediaStreams.Count() - 1
if LCase(itemData.MediaSources[i].MediaStreams[j].type) = "video"
m.videoCodec.text = tr("Video") + ": " + itemData.MediaSources[i].MediaStreams[j].DisplayTitle
exit for
end if
end for
SetupAudioDisplay(itemData.MediaSources[i].MediaStreams, item.selectedAudioStreamIndex)
exit for
end if
Expand Down
4 changes: 4 additions & 0 deletions source/static/whatsNew/1.0.6.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@
{
"description": "Fix music genre library view",
"author": "1hitsong"
},
{
"description": "Fix episode list vVideo codec display when video is not media stream 0",
"author": "1hitsong"
}
]

0 comments on commit 9ad8563

Please sign in to comment.