From ca0583bcbee3b2a66dfa2a25c63fb62081fe1239 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 6 Feb 2014 00:17:00 -0500 Subject: [PATCH] remove unseeded file system call --- MediaBrowser.Controller/Entities/IHasImages.cs | 6 ++++++ MediaBrowser.Providers/All/LocalImageProvider.cs | 8 +------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MediaBrowser.Controller/Entities/IHasImages.cs b/MediaBrowser.Controller/Entities/IHasImages.cs index 51f25979c..dd6194bc7 100644 --- a/MediaBrowser.Controller/Entities/IHasImages.cs +++ b/MediaBrowser.Controller/Entities/IHasImages.cs @@ -105,6 +105,12 @@ namespace MediaBrowser.Controller.Entities /// /// true if this instance is owned item; otherwise, false. bool IsOwnedItem { get; } + + /// + /// Gets the containing folder path. + /// + /// The containing folder path. + string ContainingFolderPath { get; } } public static class HasImagesExtensions diff --git a/MediaBrowser.Providers/All/LocalImageProvider.cs b/MediaBrowser.Providers/All/LocalImageProvider.cs index daae58ff6..5883781f9 100644 --- a/MediaBrowser.Providers/All/LocalImageProvider.cs +++ b/MediaBrowser.Providers/All/LocalImageProvider.cs @@ -72,13 +72,7 @@ namespace MediaBrowser.Providers.All return new List(); } - var path = item.Path; - var fileInfo = _fileSystem.GetFileSystemInfo(path) as DirectoryInfo; - - if (fileInfo == null) - { - path = Path.GetDirectoryName(path); - } + var path = item.ContainingFolderPath; if (includeDirectories) {