Merge pull request #1669 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2016-04-20 11:56:38 -04:00
commit 7207e0112f
12 changed files with 28 additions and 19 deletions

View File

@ -247,6 +247,12 @@ namespace MediaBrowser.Api
hasBudget.Revenue = request.Revenue; hasBudget.Revenue = request.Revenue;
} }
var hasOriginalTitle = item as IHasOriginalTitle;
if (hasOriginalTitle != null)
{
hasOriginalTitle.OriginalTitle = hasOriginalTitle.OriginalTitle;
}
var hasCriticRating = item as IHasCriticRating; var hasCriticRating = item as IHasCriticRating;
if (hasCriticRating != null) if (hasCriticRating != null)
{ {

View File

@ -125,6 +125,8 @@ namespace MediaBrowser.Controller.Entities
} }
} }
public string OriginalTitle { get; set; }
/// <summary> /// <summary>
/// Gets or sets the id. /// Gets or sets the id.
/// </summary> /// </summary>

View File

@ -18,8 +18,6 @@ namespace MediaBrowser.Controller.Entities.Movies
{ {
public List<Guid> SpecialFeatureIds { get; set; } public List<Guid> SpecialFeatureIds { get; set; }
public string OriginalTitle { get; set; }
public List<Guid> ThemeSongIds { get; set; } public List<Guid> ThemeSongIds { get; set; }
public List<Guid> ThemeVideoIds { get; set; } public List<Guid> ThemeVideoIds { get; set; }
public List<string> ProductionLocations { get; set; } public List<string> ProductionLocations { get; set; }

View File

@ -19,8 +19,6 @@ namespace MediaBrowser.Controller.Entities.TV
{ {
public List<Guid> SpecialFeatureIds { get; set; } public List<Guid> SpecialFeatureIds { get; set; }
public string OriginalTitle { get; set; }
public int? AnimeSeriesIndex { get; set; } public int? AnimeSeriesIndex { get; set; }
public Series() public Series()

View File

@ -11,7 +11,7 @@ namespace MediaBrowser.Controller.Entities
/// <summary> /// <summary>
/// Class Trailer /// Class Trailer
/// </summary> /// </summary>
public class Trailer : Video, IHasCriticRating, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTaglines, IHasMetascore, IHasLookupInfo<TrailerInfo> public class Trailer : Video, IHasCriticRating, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTaglines, IHasMetascore, IHasOriginalTitle, IHasLookupInfo<TrailerInfo>
{ {
public List<string> ProductionLocations { get; set; } public List<string> ProductionLocations { get; set; }

View File

@ -61,17 +61,8 @@ namespace MediaBrowser.Controller.Providers
}; };
//Fetch(item, metadataFile, settings, Encoding.GetEncoding("ISO-8859-1"), cancellationToken); //Fetch(item, metadataFile, settings, Encoding.GetEncoding("ISO-8859-1"), cancellationToken);
try
{
Fetch(item, metadataFile, settings, Encoding.UTF8, cancellationToken); Fetch(item, metadataFile, settings, Encoding.UTF8, cancellationToken);
} }
catch
{
Logger.Error("Error parsing xml file {0}", metadataFile);
throw;
}
}
/// <summary> /// <summary>
/// Fetches the specified item. /// Fetches the specified item.

View File

@ -26,6 +26,8 @@ namespace MediaBrowser.Model.Dto
/// <value>The name.</value> /// <value>The name.</value>
public string Name { get; set; } public string Name { get; set; }
public string OriginalTitle { get; set; }
/// <summary> /// <summary>
/// Gets or sets the server identifier. /// Gets or sets the server identifier.
/// </summary> /// </summary>

View File

@ -130,6 +130,8 @@
/// </summary> /// </summary>
Metascore, Metascore,
OriginalTitle,
/// <summary> /// <summary>
/// The item overview /// The item overview
/// </summary> /// </summary>

View File

@ -40,6 +40,15 @@ namespace MediaBrowser.Providers.Manager
} }
} }
if (replaceData || string.IsNullOrEmpty(target.OriginalTitle))
{
// Safeguard against incoming data having an emtpy name
if (!string.IsNullOrWhiteSpace(source.OriginalTitle))
{
target.OriginalTitle = source.OriginalTitle;
}
}
if (replaceData || !target.CommunityRating.HasValue) if (replaceData || !target.CommunityRating.HasValue)
{ {
target.CommunityRating = source.CommunityRating; target.CommunityRating = source.CommunityRating;

View File

@ -1126,6 +1126,11 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.Overview = item.Overview; dto.Overview = item.Overview;
} }
if (fields.Contains(ItemFields.OriginalTitle))
{
dto.OriginalTitle = item.OriginalTitle;
}
if (fields.Contains(ItemFields.ShortOverview)) if (fields.Contains(ItemFields.ShortOverview))
{ {
var hasShortOverview = item as IHasShortOverview; var hasShortOverview = item as IHasShortOverview;

View File

@ -781,9 +781,6 @@
<Content Include="dashboard-ui\collections.html"> <Content Include="dashboard-ui\collections.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="dashboard-ui\css\images\editor\lock.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\css\images\editor\missing.png"> <Content Include="dashboard-ui\css\images\editor\missing.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>

View File

@ -479,7 +479,6 @@ namespace MediaBrowser.XbmcMetadata.Savers
writer.WriteElementString("dateadded", item.DateCreated.ToLocalTime().ToString(DateAddedFormat)); writer.WriteElementString("dateadded", item.DateCreated.ToLocalTime().ToString(DateAddedFormat));
writer.WriteElementString("title", item.Name ?? string.Empty); writer.WriteElementString("title", item.Name ?? string.Empty);
writer.WriteElementString("originaltitle", item.Name ?? string.Empty);
var hasOriginalTitle = item as IHasOriginalTitle; var hasOriginalTitle = item as IHasOriginalTitle;
if (hasOriginalTitle != null) if (hasOriginalTitle != null)