diff --git a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
index fc25304495..7d80d7e12a 100644
--- a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
+++ b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
@@ -44,6 +44,11 @@ namespace MediaBrowser.Controller.Channels
///
/// The daily download limit.
public int? DailyDownloadLimit { get; set; }
+ ///
+ /// Gets or sets a value indicating whether [supports downloading].
+ ///
+ /// true if [supports downloading]; otherwise, false.
+ public bool SupportsContentDownloading { get; set; }
public InternalChannelFeatures()
{
diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelDownloadScheduledTask.cs b/MediaBrowser.Server.Implementations/Channels/ChannelDownloadScheduledTask.cs
index 0e0e4fbcb6..e0b616605d 100644
--- a/MediaBrowser.Server.Implementations/Channels/ChannelDownloadScheduledTask.cs
+++ b/MediaBrowser.Server.Implementations/Channels/ChannelDownloadScheduledTask.cs
@@ -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
- {
- await DownloadChannelItem(item, options, cancellationToken, path);
- }
- catch (OperationCanceledException)
- {
- break;
- }
- catch (ChannelDownloadException)
- {
- // Logged at lower levels
- }
- catch (Exception ex)
+ if (options.DownloadingChannels.Contains(channelItem.ChannelId))
{
- _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);
+ }
}
}
diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
index 37536a4ee9..2b17442dea 100644
--- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
+++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
@@ -508,7 +508,7 @@ namespace MediaBrowser.Server.Implementations.Channels
SupportsLatestMedia = supportsLatest,
Name = channel.Name,
Id = channel.Id.ToString("N"),
- SupportsContentDownloading = isIndexable || supportsLatest,
+ SupportsContentDownloading = features.SupportsContentDownloading && (isIndexable || supportsLatest),
AutoRefreshLevels = features.AutoRefreshLevels
};
}
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
index e079aaf610..52c21af686 100644
--- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
+++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
@@ -219,7 +219,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("wanApiAddress");
}
-
+
var url = "Servers";
url = GetConnectUrl(url);
@@ -699,7 +699,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("ConnectAccessKey");
}
-
+
options.RequestHeaders.Add("X-Connect-Token", ConnectAccessKey);
}
@@ -723,7 +723,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("ConnectServerId");
}
-
+
var url = GetConnectUrl("ServerAuthorizations");
url += "?serverId=" + ConnectServerId;
@@ -956,6 +956,10 @@ namespace MediaBrowser.Server.Implementations.Connect
_data.LastAuthorizationsRefresh = DateTime.UtcNow;
CacheData();
}
+ catch (Exception ex)
+ {
+ _logger.ErrorException("Error refreshing authorization", ex);
+ }
finally
{
_operationLock.Release();
@@ -1010,7 +1014,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("ConnectServerId");
}
-
+
var url = GetConnectUrl("ServerAuthorizations");
var options = new HttpRequestOptions
@@ -1074,7 +1078,7 @@ namespace MediaBrowser.Server.Implementations.Connect
});
SetApplicationHeader(options);
-
+
// No need to examine the response
using (var response = (await _httpClient.SendAsync(options, "POST").ConfigureAwait(false)).Content)
{
@@ -1094,7 +1098,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{
throw new ArgumentNullException("user");
}
-
+
if (string.IsNullOrEmpty(user.ConnectUserId))
{
return;
diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/MediaBrowser.Server.Implementations/Library/UserManager.cs
index b8bc8585ef..88ba3b7bf7 100644
--- a/MediaBrowser.Server.Implementations/Library/UserManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/UserManager.cs
@@ -669,11 +669,6 @@ namespace MediaBrowser.Server.Implementations.Library
throw new ArgumentNullException("newPasswordSha1");
}
- if (user.ConnectLinkType.HasValue && user.ConnectLinkType.Value == UserLinkType.Guest)
- {
- throw new ArgumentException("Passwords for guests cannot be changed.");
- }
-
user.EasyPassword = newPasswordSha1;
await UpdateUser(user).ConfigureAwait(false);
diff --git a/MediaBrowser.Server.Implementations/LiveTv/CleanDatabaseScheduledTask.cs b/MediaBrowser.Server.Implementations/LiveTv/CleanDatabaseScheduledTask.cs
deleted file mode 100644
index bed9458ecf..0000000000
--- a/MediaBrowser.Server.Implementations/LiveTv/CleanDatabaseScheduledTask.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using MediaBrowser.Common.ScheduledTasks;
-using MediaBrowser.Controller.LiveTv;
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.Server.Implementations.LiveTv
-{
- class CleanDatabaseScheduledTask : IScheduledTask, IConfigurableScheduledTask
- {
- private readonly ILiveTvManager _liveTvManager;
-
- public CleanDatabaseScheduledTask(ILiveTvManager liveTvManager)
- {
- _liveTvManager = liveTvManager;
- }
-
- public string Name
- {
- get { return "Clean TV Database"; }
- }
-
- public string Description
- {
- get { return "Deletes old programs from the tv database."; }
- }
-
- public string Category
- {
- get { return "Live TV"; }
- }
-
- public Task Execute(System.Threading.CancellationToken cancellationToken, IProgress progress)
- {
- var manager = (LiveTvManager)_liveTvManager;
-
- return manager.CleanDatabase(progress, cancellationToken);
- }
-
- public IEnumerable GetDefaultTriggers()
- {
- return new ITaskTrigger[]
- {
- new IntervalTrigger{ Interval = TimeSpan.FromHours(12)}
- };
- }
-
- public bool IsHidden
- {
- get { return _liveTvManager.ActiveService == null; }
- }
-
- public bool IsEnabled
- {
- get { return true; }
- }
- }
-}
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
index 33c3b97dc9..be3926f4c1 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -2,6 +2,7 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.IO;
+using MediaBrowser.Common.Progress;
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Configuration;
@@ -475,7 +476,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
item.ProviderImageUrl = channelInfo.ImageUrl;
item.HasProviderImage = channelInfo.HasImage;
item.ProviderImagePath = channelInfo.ImagePath;
-
+
if (string.IsNullOrEmpty(item.Name))
{
item.Name = channelInfo.Name;
@@ -887,7 +888,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv
try
{
- await RefreshChannelsInternal(progress, cancellationToken).ConfigureAwait(false);
+ var innerProgress = new ActionableProgress();
+ innerProgress.RegisterAction(p => progress.Report(p * .9));
+ await RefreshChannelsInternal(innerProgress, cancellationToken).ConfigureAwait(false);
+
+ innerProgress = new ActionableProgress();
+ innerProgress.RegisterAction(p => progress.Report(90 + (p * .1)));
+ await CleanDatabaseInternal(progress, cancellationToken).ConfigureAwait(false);
}
finally
{
@@ -998,14 +1005,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv
public async Task CleanDatabase(IProgress progress, CancellationToken cancellationToken)
{
- var service = ActiveService;
-
- if (service == null)
- {
- progress.Report(100);
- return;
- }
-
await _refreshSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false);
try
@@ -1018,8 +1017,21 @@ namespace MediaBrowser.Server.Implementations.LiveTv
}
}
+ private Task CleanDatabaseInternal(IProgress progress, CancellationToken cancellationToken)
+ {
+ return DeleteOldPrograms(_programs.Keys.ToList(), progress, cancellationToken);
+ }
+
private async Task DeleteOldPrograms(List currentIdList, IProgress progress, CancellationToken cancellationToken)
{
+ var service = ActiveService;
+
+ if (service == null)
+ {
+ progress.Report(100);
+ return;
+ }
+
var list = _itemRepo.GetItemsOfType(typeof(LiveTvProgram)).ToList();
var numComplete = 0;
diff --git a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json
index d5958358d7..31b45cb90f 100644
--- a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json
+++ b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json
@@ -70,6 +70,7 @@
"HeaderSelectCertificatePath": "Select Certificate Path",
"ConfirmMessageScheduledTaskButton": "This operation normally runs automatically as a scheduled task. It can also be run manually here. To configure the scheduled task, see:",
"HeaderSupporterBenefit": "A supporter membership provides additional benefits such as access to premium plugins, internet channel content, and more. {0}Learn more{1}.",
+ "LabelSyncNoTargetsHelp": "It looks like you don't currently have any apps that support sync.",
"HeaderWelcomeToMediaBrowserServerDashboard": "Welcome to the Media Browser Dashboard",
"HeaderWelcomeToMediaBrowserWebClient": "Welcome to the Media Browser Web Client",
"ButtonTakeTheTour": "Take the tour",
@@ -83,6 +84,7 @@
"ButtonCancelItem": "Cancel item",
"ButtonQueueForRetry": "Queue for retry",
"ButtonReenable": "Re-enable",
+ "ButtonLearnMore": "Learn more",
"SyncJobItemStatusSyncedMarkForRemoval": "Marked for removal",
"LabelAbortedByServerShutdown": "(Aborted by server shutdown)",
"LabelScheduledTaskLastRan": "Last ran {0}, taking {1}.",
diff --git a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
index ce77b3db1e..1db1f8f5b4 100644
--- a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
+++ b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
@@ -153,8 +153,8 @@
-
+
@@ -222,7 +222,6 @@
-
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
index c3f9955258..e656d68371 100644
--- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
+++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
@@ -843,10 +843,13 @@ namespace MediaBrowser.Server.Startup.Common
if (ServerConfigurationManager.Configuration.HttpServerPortNumber != HttpPort ||
ServerConfigurationManager.Configuration.HttpsPortNumber != HttpsPort)
{
- ServerConfigurationManager.Configuration.IsPortAuthorized = false;
- ServerConfigurationManager.SaveConfiguration();
+ if (ServerConfigurationManager.Configuration.IsPortAuthorized)
+ {
+ ServerConfigurationManager.Configuration.IsPortAuthorized = false;
+ ServerConfigurationManager.SaveConfiguration();
- requiresRestart = true;
+ requiresRestart = true;
+ }
}
}
diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec
index e46ceb2738..3efbb4f6d0 100644
--- a/Nuget/MediaBrowser.Common.Internal.nuspec
+++ b/Nuget/MediaBrowser.Common.Internal.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common.Internal
- 3.0.566
+ 3.0.567
MediaBrowser.Common.Internal
Luke
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.
Copyright © Media Browser 2013
-
+
diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec
index d184434b94..0c9a99cf54 100644
--- a/Nuget/MediaBrowser.Common.nuspec
+++ b/Nuget/MediaBrowser.Common.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common
- 3.0.566
+ 3.0.567
MediaBrowser.Common
Media Browser Team
ebr,Luke,scottisafool
diff --git a/Nuget/MediaBrowser.Model.Signed.nuspec b/Nuget/MediaBrowser.Model.Signed.nuspec
index ed288752b9..91b7692db0 100644
--- a/Nuget/MediaBrowser.Model.Signed.nuspec
+++ b/Nuget/MediaBrowser.Model.Signed.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Model.Signed
- 3.0.566
+ 3.0.567
MediaBrowser.Model - Signed Edition
Media Browser Team
ebr,Luke,scottisafool
diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec
index 854fc55345..558e697e37 100644
--- a/Nuget/MediaBrowser.Server.Core.nuspec
+++ b/Nuget/MediaBrowser.Server.Core.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Server.Core
- 3.0.566
+ 3.0.567
Media Browser.Server.Core
Media Browser Team
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains core components required to build plugins for Media Browser Server.
Copyright © Media Browser 2013
-
+
diff --git a/SharedVersion.cs b/SharedVersion.cs
index bd69618e34..658aa62a7e 100644
--- a/SharedVersion.cs
+++ b/SharedVersion.cs
@@ -1,4 +1,4 @@
using System.Reflection;
//[assembly: AssemblyVersion("3.0.*")]
-[assembly: AssemblyVersion("3.0.5518.1")]
+[assembly: AssemblyVersion("3.0.5518.2")]