From eeb16d6d5a238409e9d8caa0eead193707cbb15f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 19 Jan 2013 15:15:31 -0800 Subject: [PATCH] Added comments --- NzbDrone.Core/Providers/DiskScanProvider.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Core/Providers/DiskScanProvider.cs b/NzbDrone.Core/Providers/DiskScanProvider.cs index 320ae315c..c814dfd0a 100644 --- a/NzbDrone.Core/Providers/DiskScanProvider.cs +++ b/NzbDrone.Core/Providers/DiskScanProvider.cs @@ -90,6 +90,9 @@ public virtual List Scan(Series series, string path) } } + //Todo: Find the "best" episode file for all found episodes and import that one + //Todo: Move the episode linking to here, instead of import (or rename import) + series.LastDiskSync = DateTime.Now; _seriesProvider.UpdateSeries(series); @@ -107,7 +110,8 @@ public virtual EpisodeFile ImportFile(Series series, string filePath) } long size = _diskProvider.GetSize(filePath); - + + //Todo: We shouldn't skip on file size alone, 64MB Family Guy episodes are skipped... //Skip any file under 70MB - New samples don't even have sample in the name... if (size < Constants.IgnoreFileSize) { @@ -159,6 +163,9 @@ public virtual EpisodeFile ImportFile(Series series, string filePath) episodeFile.SeasonNumber = parseResult.SeasonNumber; episodeFile.SceneName = Path.GetFileNameWithoutExtension(filePath.NormalizePath()); episodeFile.ReleaseGroup = parseResult.ReleaseGroup; + + //Todo: We shouldn't actually import the file until we confirm its the only one we want. + //Todo: Separate episodeFile creation from importing (pass file to import to import) var fileId = _mediaFileProvider.Add(episodeFile); //Link file to all episodes @@ -170,7 +177,6 @@ public virtual EpisodeFile ImportFile(Series series, string filePath) Logger.Debug("Linking [{0}] > [{1}]", filePath, ep); } - return episodeFile; }