aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-24 13:50:49 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-24 13:50:49 -0400
commitf3e9bbed2361a2b0d9024186fe8854a136921cd9 (patch)
tree55316c5c6f0a869fa110826ce73658228513691f /MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
parent76875e17ee951b967e591e7f8166ed8c1f45bbf6 (diff)
update file system methods
Diffstat (limited to 'MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
index db9841f9d..ce3f0c66c 100644
--- a/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
+++ b/MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs
@@ -15,6 +15,7 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using MediaBrowser.Common.IO;
namespace MediaBrowser.Server.Implementations.Intros
{
@@ -25,14 +26,16 @@ namespace MediaBrowser.Server.Implementations.Intros
private readonly ILocalizationManager _localization;
private readonly IConfigurationManager _serverConfig;
private readonly ILibraryManager _libraryManager;
+ private readonly IFileSystem _fileSystem;
- public DefaultIntroProvider(ISecurityManager security, IChannelManager channelManager, ILocalizationManager localization, IConfigurationManager serverConfig, ILibraryManager libraryManager)
+ public DefaultIntroProvider(ISecurityManager security, IChannelManager channelManager, ILocalizationManager localization, IConfigurationManager serverConfig, ILibraryManager libraryManager, IFileSystem fileSystem)
{
_security = security;
_channelManager = channelManager;
_localization = localization;
_serverConfig = serverConfig;
_libraryManager = libraryManager;
+ _fileSystem = fileSystem;
}
public async Task<IEnumerable<IntroInfo>> GetIntros(BaseItem item, User user)
@@ -232,7 +235,7 @@ namespace MediaBrowser.Server.Implementations.Intros
return new List<string>();
}
- return Directory.EnumerateFiles(options.CustomIntroPath, "*", SearchOption.AllDirectories)
+ return _fileSystem.GetFilePaths(options.CustomIntroPath, true)
.Where(_libraryManager.IsVideoFile);
}