rename subtitle config property
This commit is contained in:
parent
d5b1730a7a
commit
c183edc238
|
@ -318,7 +318,7 @@ namespace MediaBrowser.Model.Configuration
|
|||
|
||||
public class SubtitleOptions
|
||||
{
|
||||
public bool RequireExternalSubtitles { get; set; }
|
||||
public bool RequireTextSubtitles { get; set; }
|
||||
public string[] DownloadLanguages { get; set; }
|
||||
public bool DownloadMovieSubtitles { get; set; }
|
||||
public bool DownloadEpisodeSubtitles { get; set; }
|
||||
|
|
|
@ -472,7 +472,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
.DownloadSubtitles(video,
|
||||
currentStreams,
|
||||
externalSubtitleStreams,
|
||||
_config.Configuration.SubtitleOptions.RequireExternalSubtitles,
|
||||
_config.Configuration.SubtitleOptions.RequireTextSubtitles,
|
||||
_config.Configuration.SubtitleOptions.DownloadLanguages,
|
||||
cancellationToken).ConfigureAwait(false);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
}
|
||||
|
||||
public async Task<List<string>> DownloadSubtitles(Video video,
|
||||
List<MediaStream> internalSubtitleStreams,
|
||||
List<MediaStream> internalMediaStreams,
|
||||
List<MediaStream> externalSubtitleStreams,
|
||||
bool forceExternal,
|
||||
IEnumerable<string> languages,
|
||||
|
@ -58,7 +58,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
{
|
||||
try
|
||||
{
|
||||
var downloaded = await DownloadSubtitles(video, internalSubtitleStreams, externalSubtitleStreams, forceExternal, lang, mediaType, cancellationToken)
|
||||
var downloaded = await DownloadSubtitles(video, internalMediaStreams, externalSubtitleStreams, forceExternal, lang, mediaType, cancellationToken)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
if (downloaded)
|
||||
|
@ -76,7 +76,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
}
|
||||
|
||||
private async Task<bool> DownloadSubtitles(Video video,
|
||||
IEnumerable<MediaStream> internalSubtitleStreams,
|
||||
List<MediaStream> internalMediaStreams,
|
||||
IEnumerable<MediaStream> externalSubtitleStreams,
|
||||
bool forceExternal,
|
||||
string language,
|
||||
|
@ -89,8 +89,12 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
return false;
|
||||
}
|
||||
|
||||
var internalAudioStreams = internalMediaStreams.Where(i => i.Type == MediaStreamType.Audio)
|
||||
.ToList();
|
||||
|
||||
// There's an internal subtitle stream for this language
|
||||
if (!forceExternal && internalSubtitleStreams.Any(i => string.Equals(i.Language, language, StringComparison.OrdinalIgnoreCase)))
|
||||
if (!forceExternal &&
|
||||
internalMediaStreams.Any(i => i.Type == MediaStreamType.Subtitle && string.Equals(i.Language, language, StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -707,8 +707,8 @@
|
|||
"OptionReportByteRangeSeekingWhenTranscodingHelp": "This is required for some devices that don't time seek very well.",
|
||||
"HeaderSubtitleDownloadingHelp": "Media Browser can inspect your video files for missing subtitles, and download them using a subtitle provider such as OpenSubtitles.org.",
|
||||
"HeaderDownloadSubtitlesFor": "Download subtitles for:",
|
||||
"LabelRequireExternalSubtitles": "Download even if the video already contains graphical subtitles",
|
||||
"LabelRequireExternalSubtitlesHelp": "Keeping text versions of subtitles will result in more efficient delivery to mobile clients.",
|
||||
"LabelRequireTextSubtitles": "Download even if the video already contains graphical subtitles",
|
||||
"LabelRequireTextSubtitlesHelp": "Keeping text versions of subtitles will result in more efficient delivery to mobile clients.",
|
||||
"TabSubtitles": "Subtitles",
|
||||
"LabelOpenSubtitlesUsername": "Open Subtitles username:",
|
||||
"LabelOpenSubtitlesPassword": "Open Subtitles password:",
|
||||
|
|
Loading…
Reference in New Issue
Block a user