mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
persist locked fields in xml
This commit is contained in:
@@ -1064,6 +1064,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
try
|
||||
{
|
||||
Logger.Debug("Found shortcut at {0}", i.FullName);
|
||||
|
||||
return new LinkedChild
|
||||
{
|
||||
Path = FileSystem.ResolveShortcut(i.FullName),
|
||||
@@ -1082,6 +1084,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
if (!newShortcutLinks.SequenceEqual(currentShortcutLinks))
|
||||
{
|
||||
Logger.Info("Shortcut links have changed for {0}", Path);
|
||||
|
||||
newShortcutLinks.AddRange(currentManualLinks);
|
||||
LinkedChildren = newShortcutLinks;
|
||||
return true;
|
||||
|
||||
@@ -235,6 +235,35 @@ namespace MediaBrowser.Controller.Providers
|
||||
break;
|
||||
}
|
||||
|
||||
case "LockedFields":
|
||||
{
|
||||
var fields = new List<MetadataFields>();
|
||||
|
||||
var val = reader.ReadElementContentAsString();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(val))
|
||||
{
|
||||
var list = val.Split('|').Select(i =>
|
||||
{
|
||||
MetadataFields field;
|
||||
|
||||
if (Enum.TryParse<MetadataFields>(i, true, out field))
|
||||
{
|
||||
return (MetadataFields?)field;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}).Where(i => i.HasValue).Select(i => i.Value);
|
||||
|
||||
fields.AddRange(list);
|
||||
}
|
||||
|
||||
item.LockedFields = fields;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case "TagLines":
|
||||
{
|
||||
FetchFromTaglinesNode(reader.ReadSubtree(), item);
|
||||
|
||||
Reference in New Issue
Block a user