Prevent crashes in specific scenarios

pull/6898/head
Jonas Resch 3 years ago
parent 6bbfcf1906
commit 180e2dc329

@ -33,6 +33,7 @@ namespace MediaBrowser.Controller.Entities
AdditionalParts = Array.Empty<string>(); AdditionalParts = Array.Empty<string>();
LocalAlternateVersions = Array.Empty<string>(); LocalAlternateVersions = Array.Empty<string>();
SubtitleFiles = Array.Empty<string>(); SubtitleFiles = Array.Empty<string>();
AudioFiles = Array.Empty<string>();
LinkedAlternateVersions = Array.Empty<LinkedChild>(); LinkedAlternateVersions = Array.Empty<LinkedChild>();
} }

@ -131,7 +131,7 @@ namespace MediaBrowser.Providers.MediaInfo
for (int i = 0; i < files.Count; i++) for (int i = 0; i < files.Count; i++)
{ {
string file = files[i]; string file = files[i];
if (!AudioFileParser.IsAudioFile(file, _namingOptions)) if (string.Equals(video.Path, file, StringComparison.OrdinalIgnoreCase) || !AudioFileParser.IsAudioFile(file, _namingOptions))
{ {
continue; continue;
} }

Loading…
Cancel
Save