mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 01:24:44 +01:00
sync updates
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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}.",
|
||||
|
||||
Reference in New Issue
Block a user