Files
jellyfin-jellyfin-1/Emby.Server.Implementations/Collections/CollectionsDynamicFolder.cs

35 lines
940 B
C#
Raw Normal View History

using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Entities;
using System.IO;
2016-10-25 15:02:04 -04:00
using MediaBrowser.Common.IO;
using MediaBrowser.Model.IO;
2016-09-05 16:07:36 -04:00
using MediaBrowser.Controller.Collections;
2016-10-25 15:02:04 -04:00
using MediaBrowser.Controller.IO;
2016-11-11 01:43:42 -05:00
namespace Emby.Server.Implementations.Collections
{
public class CollectionsDynamicFolder : IVirtualFolderCreator
{
private readonly IApplicationPaths _appPaths;
2016-08-13 23:12:26 -04:00
private readonly IFileSystem _fileSystem;
2015-09-13 19:07:54 -04:00
public CollectionsDynamicFolder(IApplicationPaths appPaths, IFileSystem fileSystem)
{
_appPaths = appPaths;
2015-09-13 19:07:54 -04:00
_fileSystem = fileSystem;
}
public BasePluginFolder GetFolder()
{
var path = Path.Combine(_appPaths.DataPath, "collections");
2015-09-13 17:32:02 -04:00
_fileSystem.CreateDirectory(path);
return new ManualCollectionsFolder
{
Path = path
};
}
}
}