From d8b619bcc4f56f2504ac2d4626ba74dd53ad6a49 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Thu, 8 Dec 2016 20:01:28 +0000 Subject: [PATCH 1/3] another attempt to fix #717 --- PlexRequests.Services/Jobs/RecentlyAdded.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/PlexRequests.Services/Jobs/RecentlyAdded.cs b/PlexRequests.Services/Jobs/RecentlyAdded.cs index 24fa5b58c..bc4c2c308 100644 --- a/PlexRequests.Services/Jobs/RecentlyAdded.cs +++ b/PlexRequests.Services/Jobs/RecentlyAdded.cs @@ -202,11 +202,17 @@ namespace PlexRequests.Services.Jobs private void GenerateTvHtml(RecentlyAddedModel tv, PlexSettings plexSettings, StringBuilder sb) { + var orderedTv = tv?._children; + if (orderedTv == null) + { + return; + } + orderedTv = orderedTv.OrderByDescending(x => x?.addedAt.UnixTimeStampToDateTime()).ToList(); // TV sb.Append("

New Episodes:



"); sb.Append( ""); - foreach (var t in tv._children.OrderByDescending(x => x.addedAt.UnixTimeStampToDateTime())) + foreach (var t in orderedTv) { var plexGUID = string.Empty; try From 7881a9d97c60be1928bf54ef4dc68b43f3242947 Mon Sep 17 00:00:00 2001 From: SuperPotatoMen Date: Fri, 9 Dec 2016 00:49:59 +0100 Subject: [PATCH 2/3] Workaround for #748 --- .../Migrations/Version1100.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/PlexRequests.Core.Migration/Migrations/Version1100.cs b/PlexRequests.Core.Migration/Migrations/Version1100.cs index 15c127d6e..ab028f847 100644 --- a/PlexRequests.Core.Migration/Migrations/Version1100.cs +++ b/PlexRequests.Core.Migration/Migrations/Version1100.cs @@ -238,18 +238,18 @@ namespace PlexRequests.Core.Migration.Migrations // UI = https://image.tmdb.org/t/p/w150/{{posterPath}} // Update old invalid posters - var allRequests = RequestService.GetAll().ToList(); + // var allRequests = RequestService.GetAll().ToList(); - foreach (var req in allRequests) - { - if (req.PosterPath.Contains("https://image.tmdb.org/t/p/w150/")) - { - var newImg = req.PosterPath.Replace("https://image.tmdb.org/t/p/w150/", string.Empty); - req.PosterPath = newImg; - } - } - RequestService.BatchUpdate(allRequests); - } + // foreach (var req in allRequests) + // { + // if (req.PosterPath.Contains("https://image.tmdb.org/t/p/w150/")) + // { + // var newImg = req.PosterPath.Replace("https://image.tmdb.org/t/p/w150/", string.Empty); + // req.PosterPath = newImg; + // } + // } + // RequestService.BatchUpdate(allRequests); + // } private void UpdateAdmin() { From 2fa11280bf595548e87c85b790f2422f3e60c35e Mon Sep 17 00:00:00 2001 From: SuperPotatoMen Date: Fri, 9 Dec 2016 00:54:49 +0100 Subject: [PATCH 3/3] Update Version1100.cs --- PlexRequests.Core.Migration/Migrations/Version1100.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PlexRequests.Core.Migration/Migrations/Version1100.cs b/PlexRequests.Core.Migration/Migrations/Version1100.cs index ab028f847..012bcd126 100644 --- a/PlexRequests.Core.Migration/Migrations/Version1100.cs +++ b/PlexRequests.Core.Migration/Migrations/Version1100.cs @@ -249,7 +249,7 @@ namespace PlexRequests.Core.Migration.Migrations // } // } // RequestService.BatchUpdate(allRequests); - // } + } private void UpdateAdmin() {