From f651d981eaa1bd431bc56b192ad925347d5a7ea1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 9 Jun 2013 10:15:59 -0400 Subject: [PATCH] added LockedFields to BaseItem --- MediaBrowser.Controller/Dto/DtoBuilder.cs | 6 ++++ MediaBrowser.Controller/Entities/BaseItem.cs | 12 ++++++++ .../MediaBrowser.Model.net35.csproj | 3 ++ MediaBrowser.Model/DTO/BaseItemDto.cs | 12 ++++++++ MediaBrowser.Model/Entities/MetadataFields.cs | 30 +++++++++++++++++++ MediaBrowser.Model/MediaBrowser.Model.csproj | 1 + MediaBrowser.Model/Querying/ItemFields.cs | 5 ++++ 7 files changed, 69 insertions(+) create mode 100644 MediaBrowser.Model/Entities/MetadataFields.cs diff --git a/MediaBrowser.Controller/Dto/DtoBuilder.cs b/MediaBrowser.Controller/Dto/DtoBuilder.cs index 2d2cbea5ad..200659d9cf 100644 --- a/MediaBrowser.Controller/Dto/DtoBuilder.cs +++ b/MediaBrowser.Controller/Dto/DtoBuilder.cs @@ -233,6 +233,12 @@ namespace MediaBrowser.Controller.Dto dto.DisplayMediaType = item.DisplayMediaType; } + if (fields.Contains(ItemFields.LockedFields)) + { + dto.LockedFields = item.LockedFields; + dto.LockedImages = item.LockedImages; + } + if (fields.Contains(ItemFields.Budget)) { dto.Budget = item.Budget; diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 477e003c79..b4ff76c201 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -157,6 +157,18 @@ namespace MediaBrowser.Controller.Entities /// true if [dont fetch meta]; otherwise, false. public bool DontFetchMeta { get; set; } + /// + /// Gets or sets the locked fields. + /// + /// The locked fields. + public List LockedFields { get; set; } + + /// + /// Gets or sets the locked images. + /// + /// The locked images. + public List LockedImages { get; set; } + /// /// Determines whether the item has a saved local image of the specified name (jpg or png). /// diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj index 82193c27ca..c0293b2108 100644 --- a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj +++ b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj @@ -136,6 +136,9 @@ Entities\MediaType.cs + + Entities\MetadataFields.cs + Entities\MetadataProviders.cs diff --git a/MediaBrowser.Model/DTO/BaseItemDto.cs b/MediaBrowser.Model/DTO/BaseItemDto.cs index 4739590bf6..9326bd490a 100644 --- a/MediaBrowser.Model/DTO/BaseItemDto.cs +++ b/MediaBrowser.Model/DTO/BaseItemDto.cs @@ -458,6 +458,18 @@ namespace MediaBrowser.Model.Dto /// The revenue. public double? Revenue { get; set; } + /// + /// Gets or sets the locked fields. + /// + /// The locked fields. + public List LockedFields { get; set; } + + /// + /// Gets or sets the locked images. + /// + /// The locked images. + public List LockedImages { get; set; } + /// /// Gets a value indicating whether this instance can resume. /// diff --git a/MediaBrowser.Model/Entities/MetadataFields.cs b/MediaBrowser.Model/Entities/MetadataFields.cs new file mode 100644 index 0000000000..90b3b9467c --- /dev/null +++ b/MediaBrowser.Model/Entities/MetadataFields.cs @@ -0,0 +1,30 @@ + +namespace MediaBrowser.Model.Entities +{ + /// + /// Enum MetadataFields + /// + public enum MetadataFields + { + /// + /// The cast + /// + Cast, + /// + /// The genres + /// + Genres, + /// + /// The production locations + /// + ProductionLocations, + /// + /// The studios + /// + Studios, + /// + /// The tags + /// + Tags + } +} diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index a13c8ef0c9..a2c5a594a0 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -53,6 +53,7 @@ + diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index 875329c70f..86a41b471c 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -66,6 +66,11 @@ namespace MediaBrowser.Model.Querying /// IndexOptions, + /// + /// The locked fields + /// + LockedFields, + /// /// The item overview ///