From 628c6cbc28f5a744785731dd4e94ec7a1f881dd2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 17 Jan 2015 13:15:09 -0500 Subject: make library scan a bit more hands off --- .../LiveTv/LiveTvManager.cs | 25 ++-------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'MediaBrowser.Server.Implementations/LiveTv') diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index 96498563e6..74069e5801 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -436,40 +436,19 @@ namespace MediaBrowser.Server.Implementations.LiveTv private async Task GetChannel(ChannelInfo channelInfo, string serviceName, CancellationToken cancellationToken) { - var path = Path.Combine(_config.ApplicationPaths.ItemsByNamePath, "tvchannels", _fileSystem.GetValidFilename(channelInfo.Name)); - - var fileInfo = new DirectoryInfo(path); - var isNew = false; - if (!fileInfo.Exists) - { - _logger.Debug("Creating directory {0}", path); - - Directory.CreateDirectory(path); - fileInfo = new DirectoryInfo(path); - - if (!fileInfo.Exists) - { - throw new IOException("Path not created: " + path); - } - - isNew = true; - } - var id = _tvDtoService.GetInternalChannelId(serviceName, channelInfo.Id); var item = _itemRepo.RetrieveItem(id) as LiveTvChannel; - if (item == null || !string.Equals(item.Path, path, StringComparison.OrdinalIgnoreCase)) + if (item == null) { item = new LiveTvChannel { Name = channelInfo.Name, Id = id, - DateCreated = _fileSystem.GetCreationTimeUtc(fileInfo), - DateModified = _fileSystem.GetLastWriteTimeUtc(fileInfo), - Path = path + DateCreated = DateTime.UtcNow, }; isNew = true; -- cgit v1.2.3