Added Budget, EndDate, HomePageUrl, ProductionLocations,
This commit is contained in:
parent
6474c64904
commit
192e1676a4
|
@ -55,7 +55,7 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
/// Fields to return within the items, in addition to basic information
|
||||
/// </summary>
|
||||
/// <value>The fields.</value>
|
||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: AudioInfo, Chapters, DateCreated, DisplayMediaType, DisplayPreferences, Genres, ItemCounts, IndexOptions, MediaStreams, Overview, OverviewHtml, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, SeriesInfo, SortName, Studios, Taglines, TrailerUrls, UserData", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: AudioInfo, Budget, Chapters, DateCreated, DisplayMediaType, DisplayPreferences, EndDate, Genres, HomePageUrl, ItemCounts, IndexOptions, Locations, MediaStreams, Overview, OverviewHtml, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, SeriesInfo, SortName, Studios, Taglines, TrailerUrls, UserData", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||
public string Fields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -477,6 +477,12 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <value>The premiere date.</value>
|
||||
public DateTime? PremiereDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the end date.
|
||||
/// </summary>
|
||||
/// <value>The end date.</value>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display type of the media.
|
||||
/// </summary>
|
||||
|
@ -551,6 +557,24 @@ namespace MediaBrowser.Controller.Entities
|
|||
/// <value>The genres.</value>
|
||||
public virtual List<string> Genres { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the home page URL.
|
||||
/// </summary>
|
||||
/// <value>The home page URL.</value>
|
||||
public string HomePageUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the budget.
|
||||
/// </summary>
|
||||
/// <value>The budget.</value>
|
||||
public double Budget { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the production locations.
|
||||
/// </summary>
|
||||
/// <value>The production locations.</value>
|
||||
public List<string> ProductionLocations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the community rating.
|
||||
/// </summary>
|
||||
|
@ -1064,7 +1088,7 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
throw new ArgumentNullException("name");
|
||||
}
|
||||
|
||||
if (Genres == null)
|
||||
|
@ -1078,6 +1102,29 @@ namespace MediaBrowser.Controller.Entities
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the production location.
|
||||
/// </summary>
|
||||
/// <param name="location">The location.</param>
|
||||
/// <exception cref="System.ArgumentNullException">location</exception>
|
||||
public void AddProductionLocation(string location)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(location))
|
||||
{
|
||||
throw new ArgumentNullException("location");
|
||||
}
|
||||
|
||||
if (ProductionLocations == null)
|
||||
{
|
||||
ProductionLocations = new List<string>();
|
||||
}
|
||||
|
||||
if (!ProductionLocations.Contains(location, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
ProductionLocations.Add(location);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds genres to the item
|
||||
/// </summary>
|
||||
|
|
|
@ -256,6 +256,26 @@ namespace MediaBrowser.Controller.Library
|
|||
dto.DisplayMediaType = item.DisplayMediaType;
|
||||
}
|
||||
|
||||
if (fields.Contains(ItemFields.Budget))
|
||||
{
|
||||
dto.Budget = item.Budget;
|
||||
}
|
||||
|
||||
if (fields.Contains(ItemFields.EndDate))
|
||||
{
|
||||
dto.EndDate = item.EndDate;
|
||||
}
|
||||
|
||||
if (fields.Contains(ItemFields.HomePageUrl))
|
||||
{
|
||||
dto.HomePageUrl = item.HomePageUrl;
|
||||
}
|
||||
|
||||
if (fields.Contains(ItemFields.ProductionLocations))
|
||||
{
|
||||
dto.ProductionLocations = item.ProductionLocations;
|
||||
}
|
||||
|
||||
dto.AspectRatio = item.AspectRatio;
|
||||
|
||||
dto.BackdropImageTags = GetBackdropImageTags(item);
|
||||
|
|
|
@ -121,6 +121,18 @@ namespace MediaBrowser.Controller.Providers
|
|||
break;
|
||||
}
|
||||
|
||||
case "Website":
|
||||
{
|
||||
var val = reader.ReadElementContentAsString();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(val))
|
||||
{
|
||||
item.HomePageUrl = val;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case "TagLines":
|
||||
{
|
||||
FetchFromTaglinesNode(reader.ReadSubtree(), item);
|
||||
|
|
|
@ -897,6 +897,9 @@ namespace MediaBrowser.Controller.Providers.Movies
|
|||
movie.Name = movieData.title ?? movieData.original_title ?? movie.Name;
|
||||
movie.Overview = movieData.overview;
|
||||
movie.Overview = movie.Overview != null ? movie.Overview.Replace("\n\n", "\n") : null;
|
||||
movie.HomePageUrl = movieData.homepage;
|
||||
movie.Budget = movieData.budget;
|
||||
|
||||
if (!string.IsNullOrEmpty(movieData.tagline)) movie.AddTagline(movieData.tagline);
|
||||
movie.SetProviderId(MetadataProviders.Imdb, movieData.imdb_id);
|
||||
float rating;
|
||||
|
|
|
@ -234,6 +234,21 @@ namespace MediaBrowser.Controller.Providers.Movies
|
|||
person.PremiereDate = date;
|
||||
}
|
||||
|
||||
if (DateTime.TryParseExact(searchResult.Deathday, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out date))
|
||||
{
|
||||
person.EndDate = date;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(searchResult.Homepage))
|
||||
{
|
||||
person.HomePageUrl = searchResult.Homepage;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(searchResult.Place_Of_Birth))
|
||||
{
|
||||
person.AddProductionLocation(searchResult.Place_Of_Birth);
|
||||
}
|
||||
|
||||
person.SetProviderId(MetadataProviders.Tmdb, searchResult.Id.ToString());
|
||||
}
|
||||
|
||||
|
|
|
@ -432,6 +432,34 @@ namespace MediaBrowser.Model.Dto
|
|||
/// <value>The overview HTML.</value>
|
||||
[ProtoMember(70)]
|
||||
public string OverviewHtml { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the end date.
|
||||
/// </summary>
|
||||
/// <value>The end date.</value>
|
||||
[ProtoMember(71)]
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the home page URL.
|
||||
/// </summary>
|
||||
/// <value>The home page URL.</value>
|
||||
[ProtoMember(72)]
|
||||
public string HomePageUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the production locations.
|
||||
/// </summary>
|
||||
/// <value>The production locations.</value>
|
||||
[ProtoMember(73)]
|
||||
public List<string> ProductionLocations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the budget.
|
||||
/// </summary>
|
||||
/// <value>The budget.</value>
|
||||
[ProtoMember(73)]
|
||||
public double? Budget { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance can resume.
|
||||
|
|
|
@ -11,6 +11,11 @@ namespace MediaBrowser.Model.Querying
|
|||
/// </summary>
|
||||
AudioInfo,
|
||||
|
||||
/// <summary>
|
||||
/// The budget
|
||||
/// </summary>
|
||||
Budget,
|
||||
|
||||
/// <summary>
|
||||
/// The chapters
|
||||
/// </summary>
|
||||
|
@ -31,11 +36,21 @@ namespace MediaBrowser.Model.Querying
|
|||
/// </summary>
|
||||
DisplayPreferencesId,
|
||||
|
||||
/// <summary>
|
||||
/// The end date
|
||||
/// </summary>
|
||||
EndDate,
|
||||
|
||||
/// <summary>
|
||||
/// Genres
|
||||
/// </summary>
|
||||
Genres,
|
||||
|
||||
/// <summary>
|
||||
/// The home page URL
|
||||
/// </summary>
|
||||
HomePageUrl,
|
||||
|
||||
/// <summary>
|
||||
/// Child count, recursive child count, etc
|
||||
/// </summary>
|
||||
|
@ -71,6 +86,11 @@ namespace MediaBrowser.Model.Querying
|
|||
/// </summary>
|
||||
People,
|
||||
|
||||
/// <summary>
|
||||
/// The production locations
|
||||
/// </summary>
|
||||
ProductionLocations,
|
||||
|
||||
/// <summary>
|
||||
/// Imdb, tmdb, etc
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue
Block a user