From 9fa33fc2204807206a71348f50aaf0739fa9a919 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 19 Apr 2016 23:00:18 -0400 Subject: [PATCH 1/4] switch lock from image to icon --- MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index ad714c6ca..f84fe058a 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -781,9 +781,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest From ace1ad778e319319eb0f3dfbd02979987c2d946b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 20 Apr 2016 00:30:06 -0400 Subject: [PATCH 2/4] update xml parsing logging --- .../Providers/BaseItemXmlParser.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs b/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs index f9060d184..1014fc2ee 100644 --- a/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs +++ b/MediaBrowser.Controller/Providers/BaseItemXmlParser.cs @@ -61,16 +61,7 @@ namespace MediaBrowser.Controller.Providers }; //Fetch(item, metadataFile, settings, Encoding.GetEncoding("ISO-8859-1"), cancellationToken); - - try - { - Fetch(item, metadataFile, settings, Encoding.UTF8, cancellationToken); - } - catch - { - Logger.Error("Error parsing xml file {0}", metadataFile); - throw; - } + Fetch(item, metadataFile, settings, Encoding.UTF8, cancellationToken); } /// From 992ca4c78a2bf44e1365d648989f6d028cdb9e8a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 20 Apr 2016 01:21:40 -0400 Subject: [PATCH 3/4] add OriginalTitle to metadata editor --- MediaBrowser.Api/ItemUpdateService.cs | 6 ++++++ MediaBrowser.Controller/Entities/BaseItem.cs | 2 ++ MediaBrowser.Controller/Entities/Movies/Movie.cs | 2 -- MediaBrowser.Controller/Entities/TV/Series.cs | 2 -- MediaBrowser.Controller/Entities/Trailer.cs | 2 +- MediaBrowser.Model/Dto/BaseItemDto.cs | 2 ++ MediaBrowser.Model/Querying/ItemFields.cs | 2 ++ MediaBrowser.Providers/Manager/ProviderUtils.cs | 9 +++++++++ MediaBrowser.Server.Implementations/Dto/DtoService.cs | 5 +++++ 9 files changed, 27 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs index f37874774..5bb4ed5f0 100644 --- a/MediaBrowser.Api/ItemUpdateService.cs +++ b/MediaBrowser.Api/ItemUpdateService.cs @@ -247,6 +247,12 @@ namespace MediaBrowser.Api hasBudget.Revenue = request.Revenue; } + var hasOriginalTitle = item as IHasOriginalTitle; + if (hasOriginalTitle != null) + { + hasOriginalTitle.OriginalTitle = hasOriginalTitle.OriginalTitle; + } + var hasCriticRating = item as IHasCriticRating; if (hasCriticRating != null) { diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 04371c13b..959334d78 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -125,6 +125,8 @@ namespace MediaBrowser.Controller.Entities } } + public string OriginalTitle { get; set; } + /// /// Gets or sets the id. /// diff --git a/MediaBrowser.Controller/Entities/Movies/Movie.cs b/MediaBrowser.Controller/Entities/Movies/Movie.cs index 4d2ca9ffe..6004992cc 100644 --- a/MediaBrowser.Controller/Entities/Movies/Movie.cs +++ b/MediaBrowser.Controller/Entities/Movies/Movie.cs @@ -18,8 +18,6 @@ namespace MediaBrowser.Controller.Entities.Movies { public List SpecialFeatureIds { get; set; } - public string OriginalTitle { get; set; } - public List ThemeSongIds { get; set; } public List ThemeVideoIds { get; set; } public List ProductionLocations { get; set; } diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 9eeb89a1f..7eabff072 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -19,8 +19,6 @@ namespace MediaBrowser.Controller.Entities.TV { public List SpecialFeatureIds { get; set; } - public string OriginalTitle { get; set; } - public int? AnimeSeriesIndex { get; set; } public Series() diff --git a/MediaBrowser.Controller/Entities/Trailer.cs b/MediaBrowser.Controller/Entities/Trailer.cs index c3e24090c..fe8bf3ed3 100644 --- a/MediaBrowser.Controller/Entities/Trailer.cs +++ b/MediaBrowser.Controller/Entities/Trailer.cs @@ -11,7 +11,7 @@ namespace MediaBrowser.Controller.Entities /// /// Class Trailer /// - public class Trailer : Video, IHasCriticRating, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTaglines, IHasMetascore, IHasLookupInfo + public class Trailer : Video, IHasCriticRating, IHasProductionLocations, IHasBudget, IHasKeywords, IHasTaglines, IHasMetascore, IHasOriginalTitle, IHasLookupInfo { public List ProductionLocations { get; set; } diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 7928d0bf9..49ec9f8ef 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -26,6 +26,8 @@ namespace MediaBrowser.Model.Dto /// The name. public string Name { get; set; } + public string OriginalTitle { get; set; } + /// /// Gets or sets the server identifier. /// diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index 1540f178a..cea638a39 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -130,6 +130,8 @@ /// Metascore, + OriginalTitle, + /// /// The item overview /// diff --git a/MediaBrowser.Providers/Manager/ProviderUtils.cs b/MediaBrowser.Providers/Manager/ProviderUtils.cs index 278d8ed71..59a2da460 100644 --- a/MediaBrowser.Providers/Manager/ProviderUtils.cs +++ b/MediaBrowser.Providers/Manager/ProviderUtils.cs @@ -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) { target.CommunityRating = source.CommunityRating; diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 50ae19580..2ee55edb9 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -1126,6 +1126,11 @@ namespace MediaBrowser.Server.Implementations.Dto dto.Overview = item.Overview; } + if (fields.Contains(ItemFields.OriginalTitle)) + { + dto.OriginalTitle = item.OriginalTitle; + } + if (fields.Contains(ItemFields.ShortOverview)) { var hasShortOverview = item as IHasShortOverview; From fe9ee3d891c36a2678c8013ff04e9b91aa6cf390 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 20 Apr 2016 01:32:25 -0400 Subject: [PATCH 4/4] remove duplicate originaltitle --- MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs index ba8a3bdf5..e37b83f4b 100644 --- a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs +++ b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs @@ -479,7 +479,6 @@ namespace MediaBrowser.XbmcMetadata.Savers writer.WriteElementString("dateadded", item.DateCreated.ToLocalTime().ToString(DateAddedFormat)); writer.WriteElementString("title", item.Name ?? string.Empty); - writer.WriteElementString("originaltitle", item.Name ?? string.Empty); var hasOriginalTitle = item as IHasOriginalTitle; if (hasOriginalTitle != null)