diff options
Diffstat (limited to 'MediaBrowser.Providers/TV/RemoteSeriesProvider.cs')
| -rw-r--r-- | MediaBrowser.Providers/TV/RemoteSeriesProvider.cs | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs b/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs index a250c90602..ef315f5cb2 100644 --- a/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs @@ -171,14 +171,21 @@ namespace MediaBrowser.Providers.TV // Process images var path = GetSeriesDataPath(ConfigurationManager.ApplicationPaths, seriesId); - var files = new DirectoryInfo(path) - .EnumerateFiles("*.xml", SearchOption.TopDirectoryOnly) - .Select(i => i.LastWriteTimeUtc) - .ToList(); + try + { + var files = new DirectoryInfo(path) + .EnumerateFiles("*.xml", SearchOption.TopDirectoryOnly) + .Select(i => i.LastWriteTimeUtc) + .ToList(); - if (files.Count > 0) + if (files.Count > 0) + { + return files.Max(); + } + } + catch (DirectoryNotFoundException) { - return files.Max(); + // Don't blow up } } @@ -299,11 +306,6 @@ namespace MediaBrowser.Providers.TV { var seriesDataPath = Path.Combine(GetSeriesDataPath(appPaths), seriesId); - if (!Directory.Exists(seriesDataPath)) - { - Directory.CreateDirectory(seriesDataPath); - } - return seriesDataPath; } @@ -316,11 +318,6 @@ namespace MediaBrowser.Providers.TV { var dataPath = Path.Combine(appPaths.DataPath, "tvdb"); - if (!Directory.Exists(dataPath)) - { - Directory.CreateDirectory(dataPath); - } - return dataPath; } |
