no more bad subs
This commit is contained in:
parent
a714eae7cd
commit
5961f16087
|
@ -820,5 +820,15 @@
|
||||||
<translation>Unable to find any albums or songs belonging to this artist</translation>
|
<translation>Unable to find any albums or songs belonging to this artist</translation>
|
||||||
<extracomment>Popup message when we find no audio data for an artist</extracomment>
|
<extracomment>Popup message when we find no audio data for an artist</extracomment>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Hide Unsupported Subs</source>
|
||||||
|
<translation>Hide Unsupported Subs</translation>
|
||||||
|
<extracomment>Name of a setting - should we hide subtitles that might transcode</extracomment>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Only display text subtitles to minimize transcoding.</source>
|
||||||
|
<translation>Only display text subtitles to minimize transcoding.</translation>
|
||||||
|
<extracomment>Description of a setting - should we hide subtitles that might transcode</extracomment>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
|
@ -23,6 +23,13 @@
|
||||||
"settingName": "playback.cinemamode",
|
"settingName": "playback.cinemamode",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"default": "false"
|
"default": "false"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Hide Unsupported Subs",
|
||||||
|
"description": "Only display text subtitles to minimize transcoding.",
|
||||||
|
"settingName": "playback.subs.onlytext",
|
||||||
|
"type": "bool",
|
||||||
|
"default": "false"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -200,7 +200,17 @@ sub AddVideoContent(video, mediaSourceId, audio_stream_idx = 1, subtitle_idx = -
|
||||||
end if
|
end if
|
||||||
|
|
||||||
subtitles = sortSubtitles(meta.id, m.playbackInfo.MediaSources[0].MediaStreams)
|
subtitles = sortSubtitles(meta.id, m.playbackInfo.MediaSources[0].MediaStreams)
|
||||||
video.Subtitles = subtitles["all"]
|
if get_user_setting("playback.subs.onlytext") = "true"
|
||||||
|
safesubs = []
|
||||||
|
for each subtitle in subtitles["all"]
|
||||||
|
if subtitle["IsTextSubtitleStream"]
|
||||||
|
safesubs.push(subtitle)
|
||||||
|
end if
|
||||||
|
end for
|
||||||
|
video.Subtitles = safesubs
|
||||||
|
else
|
||||||
|
video.Subtitles = subtitles["all"]
|
||||||
|
end if
|
||||||
|
|
||||||
if meta.live
|
if meta.live
|
||||||
video.transcodeParams = {
|
video.transcodeParams = {
|
||||||
|
|
|
@ -27,10 +27,13 @@ function defaultSubtitleTrackFromVid(video_id) as integer
|
||||||
if default_text_subs <> -1
|
if default_text_subs <> -1
|
||||||
return default_text_subs
|
return default_text_subs
|
||||||
else
|
else
|
||||||
return defaultSubtitleTrack(subtitles["all"]) ' if no appropriate text subs exist, allow non-text
|
if get_user_setting("playback.subs.onlytext") = "false"
|
||||||
|
return defaultSubtitleTrack(subtitles["all"]) ' if no appropriate text subs exist, allow non-text
|
||||||
|
else
|
||||||
|
return -1
|
||||||
|
end if
|
||||||
end if
|
end if
|
||||||
end if
|
end if
|
||||||
|
|
||||||
' No valid mediaSources (i.e. LiveTV)
|
' No valid mediaSources (i.e. LiveTV)
|
||||||
return -1
|
return -1
|
||||||
end function
|
end function
|
||||||
|
|
Loading…
Reference in New Issue
Block a user