aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/MediaInfo
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Providers/MediaInfo')
-rw-r--r--MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs6
-rw-r--r--MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs2
-rw-r--r--MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs2
3 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs b/MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs
index bd83862a8..43c5717e3 100644
--- a/MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs
@@ -55,7 +55,7 @@ namespace MediaBrowser.Providers.MediaInfo
{
var path = GetAudioImagePath(item);
- if (!File.Exists(path))
+ if (!_fileSystem.FileExists(path))
{
var semaphore = GetLock(path);
@@ -65,9 +65,9 @@ namespace MediaBrowser.Providers.MediaInfo
try
{
// Check again in case it was saved while waiting for the lock
- if (!File.Exists(path))
+ if (!_fileSystem.FileExists(path))
{
- Directory.CreateDirectory(Path.GetDirectoryName(path));
+ _fileSystem.CreateDirectory(Path.GetDirectoryName(path));
using (var stream = await _mediaEncoder.ExtractAudioImage(item.Path, cancellationToken).ConfigureAwait(false))
{
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
index c05f1b64b..2033107af 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
@@ -148,7 +148,7 @@ namespace MediaBrowser.Providers.MediaInfo
private void FetchShortcutInfo(Video video)
{
- video.ShortcutPath = File.ReadAllText(video.Path);
+ video.ShortcutPath = _fileSystem.ReadAllText(video.Path);
}
public Task<ItemUpdateType> FetchAudioInfo<T>(T item, CancellationToken cancellationToken)
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
index 9fc8e1f8a..1f245541a 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
@@ -706,7 +706,7 @@ namespace MediaBrowser.Providers.MediaInfo
// Try to eliminate menus and intros by skipping all files at the front of the list that are less than the minimum size
// Once we reach a file that is at least the minimum, return all subsequent ones
- var allVobs = new DirectoryInfo(root).EnumerateFiles("*", SearchOption.AllDirectories)
+ var allVobs = _fileSystem.GetFiles(root)
.Where(file => string.Equals(file.Extension, ".vob", StringComparison.OrdinalIgnoreCase))
.OrderBy(i => i.FullName)
.ToList();