allow editing of ibn items

pull/702/head
Luke Pulverenti 12 years ago
parent 5217a3cc0d
commit 2b87ab1548

@ -312,6 +312,17 @@ namespace MediaBrowser.Controller.Providers
break; break;
} }
case "LockData":
{
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val))
{
item.DontFetchMeta = string.Equals("true", val, StringComparison.OrdinalIgnoreCase);
}
break;
}
case "Network": case "Network":
{ {
foreach (var name in SplitNames(reader.ReadElementContentAsString())) foreach (var name in SplitNames(reader.ReadElementContentAsString()))

@ -69,7 +69,8 @@ namespace MediaBrowser.Providers.Savers
"Genres", "Genres",
"Studios", "Studios",
"Tags", "Tags",
"Added" "Added",
"LockData"
}); });
var position = xml.ToString().LastIndexOf("</", StringComparison.OrdinalIgnoreCase); var position = xml.ToString().LastIndexOf("</", StringComparison.OrdinalIgnoreCase);
@ -156,6 +157,8 @@ namespace MediaBrowser.Providers.Savers
builder.Append("<Added>" + SecurityElement.Escape(item.DateCreated.ToString(UsCulture)) + "</Added>"); builder.Append("<Added>" + SecurityElement.Escape(item.DateCreated.ToString(UsCulture)) + "</Added>");
builder.Append("<LockData>" + item.DontFetchMeta.ToString().ToLower() + "</LockData>");
if (!string.IsNullOrEmpty(item.DisplayMediaType)) if (!string.IsNullOrEmpty(item.DisplayMediaType))
{ {
builder.Append("<Type>" + SecurityElement.Escape(item.DisplayMediaType) + "</Type>"); builder.Append("<Type>" + SecurityElement.Escape(item.DisplayMediaType) + "</Type>");
@ -191,7 +194,7 @@ namespace MediaBrowser.Providers.Savers
builder.Append("<SortTitle>" + SecurityElement.Escape(item.ForcedSortName) + "</SortTitle>"); builder.Append("<SortTitle>" + SecurityElement.Escape(item.ForcedSortName) + "</SortTitle>");
} }
if (item.PremiereDate.HasValue) if (item.PremiereDate.HasValue && !(item is Episode))
{ {
builder.Append("<PremiereDate>" + SecurityElement.Escape(item.PremiereDate.Value.ToString("yyyy-MM-dd")) + "</PremiereDate>"); builder.Append("<PremiereDate>" + SecurityElement.Escape(item.PremiereDate.Value.ToString("yyyy-MM-dd")) + "</PremiereDate>");
} }

@ -1178,7 +1178,7 @@ namespace MediaBrowser.Server.Implementations.Library
return item; return item;
} }
return null; return RetrieveItem(id);
} }
/// <summary> /// <summary>

Loading…
Cancel
Save