add more methods to IFileSystem

This commit is contained in:
Luke Pulverenti
2015-09-13 19:07:54 -04:00
parent 6cb184fcf8
commit 8cf45a3e4a
64 changed files with 296 additions and 149 deletions

View File

@@ -4,6 +4,7 @@ using MediaBrowser.Controller.Playlists;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using MediaBrowser.Common.IO;
namespace MediaBrowser.Server.Implementations.Playlists
{
@@ -46,10 +47,12 @@ namespace MediaBrowser.Server.Implementations.Playlists
public class PlaylistsDynamicFolder : IVirtualFolderCreator
{
private readonly IApplicationPaths _appPaths;
private readonly IFileSystem _fileSystem;
public PlaylistsDynamicFolder(IApplicationPaths appPaths)
public PlaylistsDynamicFolder(IApplicationPaths appPaths, IFileSystem fileSystem)
{
_appPaths = appPaths;
_fileSystem = fileSystem;
}
public BasePluginFolder GetFolder()

View File

@@ -128,7 +128,7 @@ namespace MediaBrowser.Server.Implementations.Playlists
await parentFolder.AddChild(playlist, CancellationToken.None).ConfigureAwait(false);
await playlist.RefreshMetadata(new MetadataRefreshOptions { ForceSave = true }, CancellationToken.None)
await playlist.RefreshMetadata(new MetadataRefreshOptions(_fileSystem) { ForceSave = true }, CancellationToken.None)
.ConfigureAwait(false);
if (options.ItemIdList.Count > 0)
@@ -196,7 +196,7 @@ namespace MediaBrowser.Server.Implementations.Playlists
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
_providerManager.QueueRefresh(playlist.Id, new MetadataRefreshOptions
_providerManager.QueueRefresh(playlist.Id, new MetadataRefreshOptions(_fileSystem)
{
ForceSave = true
});
@@ -223,7 +223,7 @@ namespace MediaBrowser.Server.Implementations.Playlists
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
_providerManager.QueueRefresh(playlist.Id, new MetadataRefreshOptions
_providerManager.QueueRefresh(playlist.Id, new MetadataRefreshOptions(_fileSystem)
{
ForceSave = true
});