From 0e90bf5227ea38e81d193653ab771eca12ae859e Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 4 Oct 2015 13:47:02 -0700 Subject: [PATCH] Fixed: Don't import single files that start with ._ --- .../MediaFiles/DownloadedEpisodesImportService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs b/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs index 043870e1f..a5a56281f 100644 --- a/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs +++ b/src/NzbDrone.Core/MediaFiles/DownloadedEpisodesImportService.cs @@ -218,6 +218,16 @@ private List ProcessFile(FileInfo fileInfo, DownloadClientItem dow private List ProcessFile(FileInfo fileInfo, Series series, DownloadClientItem downloadClientItem = null) { + if (Path.GetFileNameWithoutExtension(fileInfo.Name).StartsWith("._")) + { + _logger.Debug("[{0}] starts with '._', skipping", fileInfo.FullName); + + return new List + { + new ImportResult(new ImportDecision(new LocalEpisode { Path = fileInfo.FullName }, new Rejection("Invalid video file, filename starts with '._'")), "Invalid video file, filename starts with '._'") + }; + } + if (downloadClientItem == null) { if (_diskProvider.IsFileLocked(fileInfo.FullName))