mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 22:07:13 -04:00
Use |=
This commit is contained in:
parent
572600b38e
commit
a4cac09d5b
@ -473,7 +473,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
if ((originalPremiereDate ?? DateTime.MinValue) != (item.PremiereDate ?? DateTime.MinValue) ||
|
if ((originalPremiereDate ?? DateTime.MinValue) != (item.PremiereDate ?? DateTime.MinValue) ||
|
||||||
(originalProductionYear ?? -1) != (item.ProductionYear ?? -1))
|
(originalProductionYear ?? -1) != (item.ProductionYear ?? -1))
|
||||||
{
|
{
|
||||||
updateType = updateType | ItemUpdateType.MetadataEdit;
|
updateType |= ItemUpdateType.MetadataEdit;
|
||||||
}
|
}
|
||||||
|
|
||||||
return updateType;
|
return updateType;
|
||||||
@ -493,7 +493,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
|
|
||||||
if (currentList.Length != item.Genres.Length || !currentList.OrderBy(i => i).SequenceEqual(item.Genres.OrderBy(i => i), StringComparer.OrdinalIgnoreCase))
|
if (currentList.Length != item.Genres.Length || !currentList.OrderBy(i => i).SequenceEqual(item.Genres.OrderBy(i => i), StringComparer.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
updateType = updateType | ItemUpdateType.MetadataEdit;
|
updateType |= ItemUpdateType.MetadataEdit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -514,7 +514,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
|
|
||||||
if (currentList.Length != item.Studios.Length || !currentList.OrderBy(i => i).SequenceEqual(item.Studios.OrderBy(i => i), StringComparer.OrdinalIgnoreCase))
|
if (currentList.Length != item.Studios.Length || !currentList.OrderBy(i => i).SequenceEqual(item.Studios.OrderBy(i => i), StringComparer.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
updateType = updateType | ItemUpdateType.MetadataEdit;
|
updateType |= ItemUpdateType.MetadataEdit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -529,7 +529,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
{
|
{
|
||||||
if (item.UpdateRatingToItems(children))
|
if (item.UpdateRatingToItems(children))
|
||||||
{
|
{
|
||||||
updateType = updateType | ItemUpdateType.MetadataEdit;
|
updateType |= ItemUpdateType.MetadataEdit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,7 +686,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
var remoteResult = await ExecuteRemoteProviders(temp, logName, id, providers.OfType<IRemoteMetadataProvider<TItemType, TIdType>>(), cancellationToken)
|
var remoteResult = await ExecuteRemoteProviders(temp, logName, id, providers.OfType<IRemoteMetadataProvider<TItemType, TIdType>>(), cancellationToken)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
refreshResult.UpdateType = refreshResult.UpdateType | remoteResult.UpdateType;
|
refreshResult.UpdateType |= remoteResult.UpdateType;
|
||||||
refreshResult.ErrorMessage = remoteResult.ErrorMessage;
|
refreshResult.ErrorMessage = remoteResult.ErrorMessage;
|
||||||
refreshResult.Failures += remoteResult.Failures;
|
refreshResult.Failures += remoteResult.Failures;
|
||||||
}
|
}
|
||||||
@ -709,12 +709,12 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
foreach (var remoteImage in localItem.RemoteImages)
|
foreach (var remoteImage in localItem.RemoteImages)
|
||||||
{
|
{
|
||||||
await ProviderManager.SaveImage(item, remoteImage.url, remoteImage.type, null, cancellationToken).ConfigureAwait(false);
|
await ProviderManager.SaveImage(item, remoteImage.url, remoteImage.type, null, cancellationToken).ConfigureAwait(false);
|
||||||
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.ImageUpdate;
|
refreshResult.UpdateType |= ItemUpdateType.ImageUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (imageService.MergeImages(item, localItem.Images))
|
if (imageService.MergeImages(item, localItem.Images))
|
||||||
{
|
{
|
||||||
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.ImageUpdate;
|
refreshResult.UpdateType |= ItemUpdateType.ImageUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localItem.UserDataList != null)
|
if (localItem.UserDataList != null)
|
||||||
@ -723,7 +723,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
}
|
}
|
||||||
|
|
||||||
MergeData(localItem, temp, Array.Empty<MetadataField>(), !options.ReplaceAllMetadata, true);
|
MergeData(localItem, temp, Array.Empty<MetadataField>(), !options.ReplaceAllMetadata, true);
|
||||||
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataImport;
|
refreshResult.UpdateType |= ItemUpdateType.MetadataImport;
|
||||||
|
|
||||||
// Only one local provider allowed per item
|
// Only one local provider allowed per item
|
||||||
if (item.IsLocked || localItem.Item.IsLocked || IsFullLocalMetadata(localItem.Item))
|
if (item.IsLocked || localItem.Item.IsLocked || IsFullLocalMetadata(localItem.Item))
|
||||||
@ -755,7 +755,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
var remoteResult = await ExecuteRemoteProviders(temp, logName, id, providers.OfType<IRemoteMetadataProvider<TItemType, TIdType>>(), cancellationToken)
|
var remoteResult = await ExecuteRemoteProviders(temp, logName, id, providers.OfType<IRemoteMetadataProvider<TItemType, TIdType>>(), cancellationToken)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
refreshResult.UpdateType = refreshResult.UpdateType | remoteResult.UpdateType;
|
refreshResult.UpdateType |= remoteResult.UpdateType;
|
||||||
refreshResult.ErrorMessage = remoteResult.ErrorMessage;
|
refreshResult.ErrorMessage = remoteResult.ErrorMessage;
|
||||||
refreshResult.Failures += remoteResult.Failures;
|
refreshResult.Failures += remoteResult.Failures;
|
||||||
}
|
}
|
||||||
@ -851,7 +851,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
MergeData(result, temp, Array.Empty<MetadataField>(), false, false);
|
MergeData(result, temp, Array.Empty<MetadataField>(), false, false);
|
||||||
MergeNewData(temp.Item, id);
|
MergeNewData(temp.Item, id);
|
||||||
|
|
||||||
refreshResult.UpdateType = refreshResult.UpdateType | ItemUpdateType.MetadataDownload;
|
refreshResult.UpdateType |= ItemUpdateType.MetadataDownload;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user