mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
don't try to extract images if a video doesn't have any known video streams
This commit is contained in:
parent
f9dd970bf8
commit
00e0e44398
@ -51,7 +51,7 @@ namespace MediaBrowser.Controller.MediaInfo
|
||||
/// The _logger
|
||||
/// </summary>
|
||||
private readonly Kernel _kernel;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The _logger
|
||||
/// </summary>
|
||||
@ -591,6 +591,12 @@ namespace MediaBrowser.Controller.MediaInfo
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
|
||||
// Can't extract images if there are no video streams
|
||||
if (video.MediaStreams == null || video.MediaStreams.All(m => m.Type != MediaStreamType.Video))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var changesMade = false;
|
||||
|
||||
foreach (var chapter in video.Chapters)
|
||||
|
@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.IO;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Entities;
|
||||
@ -47,6 +48,12 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
|
||||
|
||||
if (video != null)
|
||||
{
|
||||
// Can't extract images if there are no video streams
|
||||
if (video.MediaStreams == null || video.MediaStreams.All(m => m.Type != MediaStreamType.Video))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (video.VideoType == VideoType.Iso && video.IsoType.HasValue && _isoManager.CanMount(item.Path))
|
||||
{
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user