mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-30 11:22:53 +01:00
Added Budget, EndDate, HomePageUrl, ProductionLocations,
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user