diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-01-17 13:15:09 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-01-17 13:15:09 -0500 |
| commit | 628c6cbc28f5a744785731dd4e94ec7a1f881dd2 (patch) | |
| tree | ee6a85142a5641c1881b46dc062ea6f21fa0778d /MediaBrowser.Server.Implementations/LiveTv | |
| parent | 7a136349eea53097a4fb9e52de81a32bf2a4e086 (diff) | |
make library scan a bit more hands off
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv')
| -rw-r--r-- | MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs | 25 |
1 files changed, 2 insertions, 23 deletions
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<LiveTvChannel> 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; |
