mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-25 19:44:43 +01:00
add more methods to IFileSystem
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user