diff --git a/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs b/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs index 5b29dbd48..3d59f902f 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaFileExtensions.cs @@ -71,6 +71,7 @@ namespace NzbDrone.Core.MediaFiles } public static HashSet Extensions => new HashSet(_fileExtensions.Keys, StringComparer.OrdinalIgnoreCase); + public static HashSet DiskExtensions => new HashSet(new[] { ".img", ".iso", ".vob" }, StringComparer.OrdinalIgnoreCase); public static Quality GetQualityForExtension(string extension) { diff --git a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs index da6f44843..7550be637 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using FFMpegCore; +using FFMpegCore.Enums; using NLog; using NzbDrone.Common.Disk; using NzbDrone.Common.Extensions; @@ -55,6 +56,11 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo throw new FileNotFoundException("Media file does not exist: " + filename); } + if (MediaFileExtensions.DiskExtensions.Contains(Path.GetExtension(filename))) + { + return null; + } + // TODO: Cache media info by path, mtime and length so we don't need to read files multiple times try