2014-09-30 04:47:30 +00:00
|
|
|
|
using MediaBrowser.Common.IO;
|
2014-06-15 23:30:04 +00:00
|
|
|
|
using MediaBrowser.Common.Progress;
|
2014-06-02 19:32:41 +00:00
|
|
|
|
using MediaBrowser.Common.ScheduledTasks;
|
|
|
|
|
using MediaBrowser.Controller.Channels;
|
|
|
|
|
using MediaBrowser.Controller.Configuration;
|
2014-09-30 04:47:30 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2014-06-02 19:32:41 +00:00
|
|
|
|
using MediaBrowser.Controller.Library;
|
2015-01-12 05:07:19 +00:00
|
|
|
|
using MediaBrowser.Controller.Providers;
|
2014-06-02 19:32:41 +00:00
|
|
|
|
using MediaBrowser.Model.Channels;
|
2014-08-14 13:24:30 +00:00
|
|
|
|
using MediaBrowser.Model.Configuration;
|
2014-06-02 19:32:41 +00:00
|
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
|
using MediaBrowser.Model.Logging;
|
2014-06-17 01:56:23 +00:00
|
|
|
|
using MediaBrowser.Model.MediaInfo;
|
2014-06-15 23:30:04 +00:00
|
|
|
|
using MediaBrowser.Model.Querying;
|
2014-12-16 05:01:57 +00:00
|
|
|
|
using MoreLinq;
|
2014-06-02 19:32:41 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Server.Implementations.Channels
|
|
|
|
|
{
|
|
|
|
|
public class ChannelDownloadScheduledTask : IScheduledTask, IConfigurableScheduledTask
|
|
|
|
|
{
|
|
|
|
|
private readonly IChannelManager _manager;
|
|
|
|
|
private readonly IServerConfigurationManager _config;
|
|
|
|
|
private readonly ILogger _logger;
|
|
|
|
|
private readonly IFileSystem _fileSystem;
|
|
|
|
|
private readonly ILibraryManager _libraryManager;
|
2014-06-15 23:30:04 +00:00
|
|
|
|
private readonly IUserManager _userManager;
|
2014-06-02 19:32:41 +00:00
|
|
|
|
|
2015-07-23 05:25:55 +00:00
|
|
|
|
public ChannelDownloadScheduledTask(IChannelManager manager, IServerConfigurationManager config, ILogger logger, IFileSystem fileSystem, ILibraryManager libraryManager, IUserManager userManager)
|
2014-06-02 19:32:41 +00:00
|
|
|
|
{
|
|
|
|
|
_manager = manager;
|
|
|
|
|
_config = config;
|
|
|
|
|
_logger = logger;
|
|
|
|
|
_fileSystem = fileSystem;
|
|
|
|
|
_libraryManager = libraryManager;
|
2014-06-15 23:30:04 +00:00
|
|
|
|
_userManager = userManager;
|
2014-06-02 19:32:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return "Download channel content"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Description
|
|
|
|
|
{
|
|
|
|
|
get { return "Downloads channel content based on configuration."; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Category
|
|
|
|
|
{
|
|
|
|
|
get { return "Channels"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task Execute(CancellationToken cancellationToken, IProgress<double> progress)
|
|
|
|
|
{
|
|
|
|
|
CleanChannelContent(cancellationToken);
|
|
|
|
|
|
2014-12-16 05:01:57 +00:00
|
|
|
|
var users = _userManager.Users
|
|
|
|
|
.DistinctBy(GetUserDistinctValue)
|
|
|
|
|
.Select(i => i.Id.ToString("N"))
|
|
|
|
|
.ToList();
|
2014-06-15 23:30:04 +00:00
|
|
|
|
|
|
|
|
|
var numComplete = 0;
|
|
|
|
|
|
|
|
|
|
foreach (var user in users)
|
|
|
|
|
{
|
|
|
|
|
double percentPerUser = 1;
|
|
|
|
|
percentPerUser /= users.Count;
|
|
|
|
|
var startingPercent = numComplete * percentPerUser * 100;
|
|
|
|
|
|
|
|
|
|
var innerProgress = new ActionableProgress<double>();
|
2014-07-30 03:31:35 +00:00
|
|
|
|
innerProgress.RegisterAction(p => progress.Report(startingPercent + (percentPerUser * p)));
|
2014-06-15 23:30:04 +00:00
|
|
|
|
|
|
|
|
|
await DownloadContent(user, cancellationToken, innerProgress).ConfigureAwait(false);
|
|
|
|
|
|
|
|
|
|
numComplete++;
|
|
|
|
|
double percent = numComplete;
|
|
|
|
|
percent /= users.Count;
|
|
|
|
|
progress.Report(percent * 100);
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-02 19:32:41 +00:00
|
|
|
|
progress.Report(100);
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-16 05:01:57 +00:00
|
|
|
|
public static string GetUserDistinctValue(User user)
|
|
|
|
|
{
|
2015-01-13 03:46:44 +00:00
|
|
|
|
var channels = user.Policy.EnabledChannels
|
2014-12-16 05:01:57 +00:00
|
|
|
|
.OrderBy(i => i)
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
return string.Join("|", channels.ToArray());
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-15 23:30:04 +00:00
|
|
|
|
private async Task DownloadContent(string user,
|
|
|
|
|
CancellationToken cancellationToken,
|
|
|
|
|
IProgress<double> progress)
|
2014-06-02 19:32:41 +00:00
|
|
|
|
{
|
2014-06-15 23:30:04 +00:00
|
|
|
|
var innerProgress = new ActionableProgress<double>();
|
|
|
|
|
innerProgress.RegisterAction(p => progress.Report(0 + (.8 * p)));
|
|
|
|
|
await DownloadAllChannelContent(user, cancellationToken, innerProgress).ConfigureAwait(false);
|
|
|
|
|
progress.Report(80);
|
|
|
|
|
|
|
|
|
|
innerProgress = new ActionableProgress<double>();
|
|
|
|
|
innerProgress.RegisterAction(p => progress.Report(80 + (.2 * p)));
|
|
|
|
|
await DownloadLatestChannelContent(user, cancellationToken, progress).ConfigureAwait(false);
|
|
|
|
|
progress.Report(100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task DownloadLatestChannelContent(string userId,
|
|
|
|
|
CancellationToken cancellationToken,
|
|
|
|
|
IProgress<double> progress)
|
|
|
|
|
{
|
2014-09-30 04:47:30 +00:00
|
|
|
|
var result = await _manager.GetLatestChannelItemsInternal(new AllChannelMediaQuery
|
2014-06-02 19:32:41 +00:00
|
|
|
|
{
|
2014-06-15 23:30:04 +00:00
|
|
|
|
UserId = userId
|
2014-06-02 19:32:41 +00:00
|
|
|
|
|
2014-06-15 23:30:04 +00:00
|
|
|
|
}, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
|
|
|
|
progress.Report(5);
|
|
|
|
|
|
|
|
|
|
var innerProgress = new ActionableProgress<double>();
|
|
|
|
|
innerProgress.RegisterAction(p => progress.Report(5 + (.95 * p)));
|
2014-06-02 19:32:41 +00:00
|
|
|
|
|
|
|
|
|
var path = _manager.ChannelDownloadPath;
|
|
|
|
|
|
2014-06-15 23:30:04 +00:00
|
|
|
|
await DownloadChannelContent(result, path, cancellationToken, innerProgress).ConfigureAwait(false);
|
2014-06-02 19:32:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-06-15 23:30:04 +00:00
|
|
|
|
private async Task DownloadAllChannelContent(string userId,
|
|
|
|
|
CancellationToken cancellationToken,
|
|
|
|
|
IProgress<double> progress)
|
2014-06-02 19:32:41 +00:00
|
|
|
|
{
|
2014-09-30 04:47:30 +00:00
|
|
|
|
var result = await _manager.GetAllMediaInternal(new AllChannelMediaQuery
|
2014-06-02 19:32:41 +00:00
|
|
|
|
{
|
2014-06-15 23:30:04 +00:00
|
|
|
|
UserId = userId
|
2014-06-02 19:32:41 +00:00
|
|
|
|
|
|
|
|
|
}, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
|
2014-06-15 23:30:04 +00:00
|
|
|
|
progress.Report(5);
|
|
|
|
|
|
|
|
|
|
var innerProgress = new ActionableProgress<double>();
|
|
|
|
|
innerProgress.RegisterAction(p => progress.Report(5 + (.95 * p)));
|
|
|
|
|
|
2014-06-02 19:32:41 +00:00
|
|
|
|
var path = _manager.ChannelDownloadPath;
|
|
|
|
|
|
2014-06-15 23:30:04 +00:00
|
|
|
|
await DownloadChannelContent(result, path, cancellationToken, innerProgress).ConfigureAwait(false);
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-30 04:47:30 +00:00
|
|
|
|
private async Task DownloadChannelContent(QueryResult<BaseItem> result,
|
2014-06-15 23:30:04 +00:00
|
|
|
|
string path,
|
|
|
|
|
CancellationToken cancellationToken,
|
|
|
|
|
IProgress<double> progress)
|
|
|
|
|
{
|
2014-06-02 19:32:41 +00:00
|
|
|
|
var numComplete = 0;
|
|
|
|
|
|
2014-06-30 17:40:46 +00:00
|
|
|
|
var options = _config.GetChannelsConfiguration();
|
|
|
|
|
|
2014-06-02 19:32:41 +00:00
|
|
|
|
foreach (var item in result.Items)
|
|
|
|
|
{
|
2015-04-03 15:50:50 +00:00
|
|
|
|
var channelItem = item as IChannelMediaItem;
|
2015-02-11 03:28:34 +00:00
|
|
|
|
|
2015-04-03 15:50:50 +00:00
|
|
|
|
if (channelItem != null)
|
2014-06-02 19:32:41 +00:00
|
|
|
|
{
|
2015-04-03 15:50:50 +00:00
|
|
|
|
var channelFeatures = _manager.GetChannelFeatures(channelItem.ChannelId);
|
|
|
|
|
|
|
|
|
|
if (channelFeatures.SupportsContentDownloading)
|
2014-06-15 23:30:04 +00:00
|
|
|
|
{
|
2015-04-03 15:50:50 +00:00
|
|
|
|
if (options.DownloadingChannels.Contains(channelItem.ChannelId))
|
2015-02-11 03:28:34 +00:00
|
|
|
|
{
|
2015-04-03 15:50:50 +00:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
await DownloadChannelItem(channelItem, 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);
|
|
|
|
|
}
|
2015-02-11 03:28:34 +00:00
|
|
|
|
}
|
2014-06-15 23:30:04 +00:00
|
|
|
|
}
|
2014-06-02 19:32:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
numComplete++;
|
|
|
|
|
double percent = numComplete;
|
|
|
|
|
percent /= result.Items.Length;
|
2014-06-15 23:30:04 +00:00
|
|
|
|
progress.Report(percent * 100);
|
2014-06-02 19:32:41 +00:00
|
|
|
|
}
|
2014-06-15 23:30:04 +00:00
|
|
|
|
|
|
|
|
|
progress.Report(100);
|
2014-06-02 19:32:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-09-18 04:50:21 +00:00
|
|
|
|
private double? GetDownloadLimit(ChannelOptions channelOptions)
|
|
|
|
|
{
|
|
|
|
|
return channelOptions.DownloadSizeLimit;
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-28 20:22:27 +00:00
|
|
|
|
private async Task DownloadChannelItem(IChannelMediaItem item,
|
2014-08-14 13:24:30 +00:00
|
|
|
|
ChannelOptions channelOptions,
|
2014-06-02 19:32:41 +00:00
|
|
|
|
CancellationToken cancellationToken,
|
|
|
|
|
string path)
|
|
|
|
|
{
|
2014-09-30 04:47:30 +00:00
|
|
|
|
var itemId = item.Id.ToString("N");
|
2015-03-28 20:22:27 +00:00
|
|
|
|
var sources = await _manager.GetStaticMediaSources(item, true, cancellationToken)
|
2014-06-02 19:32:41 +00:00
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
|
|
2014-10-08 01:37:45 +00:00
|
|
|
|
var cachedVersions = sources.Where(i => i.Protocol == MediaProtocol.File).ToList();
|
2014-06-02 19:32:41 +00:00
|
|
|
|
|
|
|
|
|
if (cachedVersions.Count > 0)
|
|
|
|
|
{
|
2014-06-03 02:01:30 +00:00
|
|
|
|
await RefreshMediaSourceItems(cachedVersions, cancellationToken).ConfigureAwait(false);
|
2014-06-02 19:32:41 +00:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-12 05:07:19 +00:00
|
|
|
|
var limit = GetDownloadLimit(channelOptions);
|
|
|
|
|
|
|
|
|
|
if (limit.HasValue)
|
|
|
|
|
{
|
|
|
|
|
if (IsSizeLimitReached(path, limit.Value))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-28 20:22:27 +00:00
|
|
|
|
var destination = Path.Combine(path, item.ChannelId, itemId);
|
2014-06-02 19:32:41 +00:00
|
|
|
|
|
2015-03-28 20:22:27 +00:00
|
|
|
|
await _manager.DownloadChannelItem(item, destination, new Progress<double>(), cancellationToken)
|
2014-09-30 04:47:30 +00:00
|
|
|
|
.ConfigureAwait(false);
|
2014-06-02 19:32:41 +00:00
|
|
|
|
|
2014-09-30 04:47:30 +00:00
|
|
|
|
await RefreshMediaSourceItem(destination, cancellationToken).ConfigureAwait(false);
|
|
|
|
|
}
|
2014-06-02 19:32:41 +00:00
|
|
|
|
|
2014-09-30 04:47:30 +00:00
|
|
|
|
private async Task RefreshMediaSourceItems(IEnumerable<MediaSourceInfo> items, CancellationToken cancellationToken)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in items)
|
2014-06-02 19:32:41 +00:00
|
|
|
|
{
|
2014-09-30 04:47:30 +00:00
|
|
|
|
await RefreshMediaSourceItem(item.Path, cancellationToken).ConfigureAwait(false);
|
2014-06-02 19:32:41 +00:00
|
|
|
|
}
|
2014-09-30 04:47:30 +00:00
|
|
|
|
}
|
2014-06-02 19:32:41 +00:00
|
|
|
|
|
2014-09-30 04:47:30 +00:00
|
|
|
|
private async Task RefreshMediaSourceItem(string path, CancellationToken cancellationToken)
|
|
|
|
|
{
|
|
|
|
|
var item = _libraryManager.ResolvePath(new FileInfo(path));
|
2014-06-22 05:52:31 +00:00
|
|
|
|
|
2014-09-30 04:47:30 +00:00
|
|
|
|
if (item != null)
|
2014-06-22 05:52:31 +00:00
|
|
|
|
{
|
2015-01-12 05:07:19 +00:00
|
|
|
|
var forceSave = false;
|
|
|
|
|
|
2014-09-30 04:47:30 +00:00
|
|
|
|
// Get the version from the database
|
2015-01-12 05:07:19 +00:00
|
|
|
|
var dbItem = _libraryManager.GetItemById(item.Id);
|
|
|
|
|
|
|
|
|
|
if (dbItem == null)
|
|
|
|
|
{
|
|
|
|
|
forceSave = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
item = dbItem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await item.RefreshMetadata(new MetadataRefreshOptions
|
|
|
|
|
{
|
|
|
|
|
ForceSave = forceSave
|
2014-09-30 04:47:30 +00:00
|
|
|
|
|
2015-01-12 05:07:19 +00:00
|
|
|
|
}, cancellationToken).ConfigureAwait(false);
|
2014-06-22 05:52:31 +00:00
|
|
|
|
}
|
2014-06-02 19:32:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-08-14 13:24:30 +00:00
|
|
|
|
private bool IsSizeLimitReached(string path, double gbLimit)
|
|
|
|
|
{
|
2014-09-16 03:33:30 +00:00
|
|
|
|
try
|
2014-08-14 13:24:30 +00:00
|
|
|
|
{
|
2014-09-16 03:33:30 +00:00
|
|
|
|
var byteLimit = gbLimit * 1000000000;
|
2014-08-14 13:24:30 +00:00
|
|
|
|
|
2014-09-16 03:33:30 +00:00
|
|
|
|
long total = 0;
|
|
|
|
|
|
|
|
|
|
foreach (var file in new DirectoryInfo(path).EnumerateFiles("*", SearchOption.AllDirectories))
|
2014-08-14 13:24:30 +00:00
|
|
|
|
{
|
2014-09-16 03:33:30 +00:00
|
|
|
|
total += file.Length;
|
|
|
|
|
|
|
|
|
|
if (total >= byteLimit)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2014-08-14 13:24:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-09-16 03:33:30 +00:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
catch (DirectoryNotFoundException)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2014-08-14 13:24:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-06-02 19:32:41 +00:00
|
|
|
|
public IEnumerable<ITaskTrigger> GetDefaultTriggers()
|
|
|
|
|
{
|
|
|
|
|
return new ITaskTrigger[]
|
|
|
|
|
{
|
2014-09-22 21:56:54 +00:00
|
|
|
|
new IntervalTrigger{ Interval = TimeSpan.FromHours(3)},
|
2014-06-02 19:32:41 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-15 23:30:04 +00:00
|
|
|
|
private void CleanChannelContent(CancellationToken cancellationToken)
|
|
|
|
|
{
|
2014-06-30 17:40:46 +00:00
|
|
|
|
var options = _config.GetChannelsConfiguration();
|
|
|
|
|
|
|
|
|
|
if (!options.MaxDownloadAge.HasValue)
|
2014-06-15 23:30:04 +00:00
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-30 17:40:46 +00:00
|
|
|
|
var minDateModified = DateTime.UtcNow.AddDays(0 - options.MaxDownloadAge.Value);
|
2014-06-15 23:30:04 +00:00
|
|
|
|
|
|
|
|
|
var path = _manager.ChannelDownloadPath;
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
DeleteCacheFilesFromDirectory(cancellationToken, path, minDateModified, new Progress<double>());
|
|
|
|
|
}
|
|
|
|
|
catch (DirectoryNotFoundException)
|
|
|
|
|
{
|
|
|
|
|
// No biggie here. Nothing to delete
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-02 19:32:41 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes the cache files from directory with a last write time less than a given date
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="cancellationToken">The task cancellation token.</param>
|
|
|
|
|
/// <param name="directory">The directory.</param>
|
|
|
|
|
/// <param name="minDateModified">The min date modified.</param>
|
|
|
|
|
/// <param name="progress">The progress.</param>
|
|
|
|
|
private void DeleteCacheFilesFromDirectory(CancellationToken cancellationToken, string directory, DateTime minDateModified, IProgress<double> progress)
|
|
|
|
|
{
|
|
|
|
|
var filesToDelete = new DirectoryInfo(directory).EnumerateFiles("*", SearchOption.AllDirectories)
|
|
|
|
|
.Where(f => _fileSystem.GetLastWriteTimeUtc(f) < minDateModified)
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
var index = 0;
|
|
|
|
|
|
|
|
|
|
foreach (var file in filesToDelete)
|
|
|
|
|
{
|
|
|
|
|
double percent = index;
|
|
|
|
|
percent /= filesToDelete.Count;
|
|
|
|
|
|
|
|
|
|
progress.Report(100 * percent);
|
|
|
|
|
|
|
|
|
|
cancellationToken.ThrowIfCancellationRequested();
|
|
|
|
|
|
|
|
|
|
DeleteFile(file.FullName);
|
|
|
|
|
|
|
|
|
|
index++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
progress.Report(100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes the file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="path">The path.</param>
|
|
|
|
|
private void DeleteFile(string path)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2015-01-13 03:46:44 +00:00
|
|
|
|
_fileSystem.DeleteFile(path);
|
2014-06-02 19:32:41 +00:00
|
|
|
|
}
|
|
|
|
|
catch (IOException ex)
|
|
|
|
|
{
|
|
|
|
|
_logger.ErrorException("Error deleting file {0}", ex, path);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-15 23:30:04 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a value indicating whether this instance is hidden.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
|
2014-06-02 19:32:41 +00:00
|
|
|
|
public bool IsHidden
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2014-06-15 23:30:04 +00:00
|
|
|
|
return !_manager.GetAllChannelFeatures().Any();
|
2014-06-02 19:32:41 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-15 23:30:04 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a value indicating whether this instance is enabled.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value><c>true</c> if this instance is enabled; otherwise, <c>false</c>.</value>
|
2014-06-02 19:32:41 +00:00
|
|
|
|
public bool IsEnabled
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|