Catch external streams exceptions

This commit is contained in:
nyanmisaka 2022-06-21 17:29:56 +08:00
parent 1ffc77b43d
commit 8ea8dcf128

View File

@ -100,6 +100,8 @@ namespace MediaBrowser.Providers.MediaInfo
foreach (var pathInfo in pathInfos)
{
if (!pathInfo.Path.AsSpan().EndsWith(".strm", StringComparison.OrdinalIgnoreCase))
{
try
{
var mediaInfo = await GetMediaInfo(pathInfo.Path, _type, cancellationToken).ConfigureAwait(false);
@ -131,6 +133,11 @@ namespace MediaBrowser.Providers.MediaInfo
}
}
}
catch
{
continue;
}
}
}
return mediaStreams.AsReadOnly();