Add missing checks for item locked state in metadata updates
This commit is contained in:
parent
1c72a8e006
commit
2d2b0a528c
|
@ -334,6 +334,12 @@ namespace MediaBrowser.Providers.Manager
|
|||
updateType |= UpdateCumulativeRunTimeTicks(item, children);
|
||||
updateType |= UpdateDateLastMediaAdded(item, children);
|
||||
|
||||
// don't update user-changeable metadata for locked items
|
||||
if (item.IsLocked)
|
||||
{
|
||||
return updateType;
|
||||
}
|
||||
|
||||
if (EnableUpdatingPremiereDateFromChildren)
|
||||
{
|
||||
updateType |= UpdatePremiereDate(item, children);
|
||||
|
|
|
@ -105,7 +105,10 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||
audio.RunTimeTicks = mediaInfo.RunTimeTicks;
|
||||
audio.Size = mediaInfo.Size;
|
||||
|
||||
FetchDataFromTags(audio);
|
||||
if (!audio.IsLocked)
|
||||
{
|
||||
FetchDataFromTags(audio);
|
||||
}
|
||||
|
||||
_itemRepo.SaveMediaStreams(audio.Id, mediaInfo.MediaStreams, cancellationToken);
|
||||
}
|
||||
|
|
|
@ -54,6 +54,12 @@ namespace MediaBrowser.Providers.Music
|
|||
{
|
||||
var updateType = base.UpdateMetadataFromChildren(item, children, isFullRefresh, currentUpdateType);
|
||||
|
||||
// don't update user-changeable metadata for locked items
|
||||
if (item.IsLocked)
|
||||
{
|
||||
return updateType;
|
||||
}
|
||||
|
||||
if (isFullRefresh || currentUpdateType > ItemUpdateType.None)
|
||||
{
|
||||
if (!item.LockedFields.Contains(MetadataField.Name))
|
||||
|
|
Loading…
Reference in New Issue
Block a user