diff options
Diffstat (limited to 'MediaBrowser.Api/Library')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryService.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryStructureService.cs | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 9106d86ff5..eb1cd6084b 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -27,6 +27,7 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Common.IO; namespace MediaBrowser.Api.Library { @@ -282,12 +283,13 @@ namespace MediaBrowser.Api.Library private readonly IChannelManager _channelManager; private readonly ITVSeriesManager _tvManager; private readonly ILibraryMonitor _libraryMonitor; + private readonly IFileSystem _fileSystem; /// <summary> /// Initializes a new instance of the <see cref="LibraryService" /> class. /// </summary> public LibraryService(IItemRepository itemRepo, ILibraryManager libraryManager, IUserManager userManager, - IDtoService dtoService, IUserDataManager userDataManager, IAuthorizationContext authContext, IActivityManager activityManager, ILocalizationManager localization, ILiveTvManager liveTv, IChannelManager channelManager, ITVSeriesManager tvManager, ILibraryMonitor libraryMonitor) + IDtoService dtoService, IUserDataManager userDataManager, IAuthorizationContext authContext, IActivityManager activityManager, ILocalizationManager localization, ILiveTvManager liveTv, IChannelManager channelManager, ITVSeriesManager tvManager, ILibraryMonitor libraryMonitor, IFileSystem fileSystem) { _itemRepo = itemRepo; _libraryManager = libraryManager; @@ -301,6 +303,7 @@ namespace MediaBrowser.Api.Library _channelManager = channelManager; _tvManager = tvManager; _libraryMonitor = libraryMonitor; + _fileSystem = fileSystem; } public object Get(GetSimilarItems request) diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index c9baf5c376..c8731637c3 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -210,7 +210,10 @@ namespace MediaBrowser.Api.Library { var path = Path.Combine(virtualFolderPath, request.CollectionType + ".collection"); - _fileSystem.CreateFile(path); + using (File.Create(path)) + { + + } } } finally |
