From fb4c559549315ee636005a9828717a55c58eae5b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 9 Jun 2013 09:31:23 -0400 Subject: [PATCH] set DontFetchMeta at resolve time --- MediaBrowser.Controller/Entities/BaseItem.cs | 14 +------------- .../Library/ResolverHelper.cs | 5 ++++- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index f5aed6d21..477e003c7 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -155,19 +155,7 @@ namespace MediaBrowser.Controller.Entities /// Returns true if this item should not attempt to fetch metadata /// /// true if [dont fetch meta]; otherwise, false. - [IgnoreDataMember] - public virtual bool DontFetchMeta - { - get - { - if (Path != null) - { - return Path.IndexOf("[dontfetchmeta]", StringComparison.OrdinalIgnoreCase) != -1; - } - - return false; - } - } + public bool DontFetchMeta { get; set; } /// /// Determines whether the item has a saved local image of the specified name (jpg or png). diff --git a/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs b/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs index 18604fa9e..ef303008d 100644 --- a/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs +++ b/MediaBrowser.Server.Implementations/Library/ResolverHelper.cs @@ -1,9 +1,10 @@ using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.Resolvers; +using System; using System.IO; using System.Text.RegularExpressions; -using MediaBrowser.Controller.Resolvers; namespace MediaBrowser.Server.Implementations.Library { @@ -39,6 +40,8 @@ namespace MediaBrowser.Server.Implementations.Library // Make sure the item has a name EnsureName(item); + item.DontFetchMeta = item.Path.IndexOf("[dontfetchmeta]", StringComparison.OrdinalIgnoreCase) != -1; + // Make sure DateCreated and DateModified have values EntityResolutionHelper.EnsureDates(item, args); }