update mouse handler

This commit is contained in:
Luke Pulverenti 2015-10-23 12:04:33 -04:00
parent 4c8236d887
commit 11c5bd4a74
3 changed files with 29 additions and 3 deletions

View File

@ -208,6 +208,12 @@ namespace MediaBrowser.Common.Implementations.Security
using (var response = await _httpClient.Post(options).ConfigureAwait(false))
{
var reg = _jsonSerializer.DeserializeFromStream<RegRecord>(response.Content);
if (reg == null)
{
_logger.Warn("Result from appstore registration was null. Defaulting to empty.");
reg = new RegRecord();
}
if (!String.IsNullOrEmpty(reg.key))
{
SupporterKey = reg.key;

View File

@ -296,10 +296,17 @@ namespace MediaBrowser.Controller.Entities.TV
{
var hasChanges = base.BeforeMetadataRefresh();
try
{
if (LibraryManager.FillMissingEpisodeNumbersFromPath(this))
{
hasChanges = true;
}
}
catch (Exception ex)
{
Logger.ErrorException("Error in FillMissingEpisodeNumbersFromPath. Episode: {0}", ex, Path ?? Name ?? Id.ToString());
}
return hasChanges;
}

View File

@ -144,7 +144,8 @@ namespace MediaBrowser.Providers.Manager
if (providers.Count > 0)
{
var id = itemOfType.GetLookupInfo();
await ItemIdentifier<TIdType>.FindIdentities(id, ProviderManager, cancellationToken);
await FindIdentities(id, cancellationToken).ConfigureAwait(false);
var result = await RefreshWithProviders(metadataResult, id, refreshOptions, providers, itemImageProvider, cancellationToken).ConfigureAwait(false);
@ -216,6 +217,18 @@ namespace MediaBrowser.Providers.Manager
return updateType;
}
private async Task FindIdentities(TIdType id, CancellationToken cancellationToken)
{
try
{
await ItemIdentifier<TIdType>.FindIdentities(id, ProviderManager, cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
{
Logger.ErrorException("Error in FindIdentities", ex);
}
}
private DateTime GetLastRefreshDate(IHasMetadata item)
{
if (item.DateLastRefreshed != default(DateTime))