sync updates

This commit is contained in:
Luke Pulverenti
2015-02-10 22:28:34 -05:00
parent f1a715b836
commit 5d4fec778c
11 changed files with 47 additions and 35 deletions

View File

@@ -170,23 +170,29 @@ namespace MediaBrowser.Server.Implementations.Channels
foreach (var item in result.Items)
{
var channelItem = (IChannelItem)item;
if (options.DownloadingChannels.Contains(channelItem.ChannelId))
var channelFeatures = _manager.GetChannelFeatures(channelItem.ChannelId);
if (channelFeatures.SupportsContentDownloading)
{
try
if (options.DownloadingChannels.Contains(channelItem.ChannelId))
{
await DownloadChannelItem(item, options, cancellationToken, path);
}
catch (OperationCanceledException)
{
break;
}
catch (ChannelDownloadException)
{
// Logged at lower levels
}
catch (Exception ex)
{
_logger.ErrorException("Error downloading channel content for {0}", ex, item.Name);
try
{
await DownloadChannelItem(item, options, cancellationToken, path);
}
catch (OperationCanceledException)
{
break;
}
catch (ChannelDownloadException)
{
// Logged at lower levels
}
catch (Exception ex)
{
_logger.ErrorException("Error downloading channel content for {0}", ex, item.Name);
}
}
}