This commit is contained in:
Jamie.Rees 2016-12-09 08:06:05 +00:00
commit 7781a4ee2f
2 changed files with 18 additions and 12 deletions

View file

@ -238,17 +238,17 @@ namespace PlexRequests.Core.Migration.Migrations
// UI = https://image.tmdb.org/t/p/w150/{{posterPath}} // UI = https://image.tmdb.org/t/p/w150/{{posterPath}}
// Update old invalid posters // Update old invalid posters
var allRequests = RequestService.GetAll().ToList(); // var allRequests = RequestService.GetAll().ToList();
foreach (var req in allRequests) // foreach (var req in allRequests)
{ // {
if (req.PosterPath.Contains("https://image.tmdb.org/t/p/w150/")) // 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); // var newImg = req.PosterPath.Replace("https://image.tmdb.org/t/p/w150/", string.Empty);
req.PosterPath = newImg; // req.PosterPath = newImg;
} // }
} // }
RequestService.BatchUpdate(allRequests); // RequestService.BatchUpdate(allRequests);
} }
private void UpdateAdmin() private void UpdateAdmin()

View file

@ -202,11 +202,17 @@ namespace PlexRequests.Services.Jobs
private void GenerateTvHtml(RecentlyAddedModel tv, PlexSettings plexSettings, StringBuilder sb) 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 // TV
sb.Append("<h1>New Episodes:</h1><br/><br/>"); sb.Append("<h1>New Episodes:</h1><br/><br/>");
sb.Append( sb.Append(
"<table border=\"0\" cellpadding=\"0\" align=\"center\" cellspacing=\"0\" style=\"border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;\" width=\"100%\">"); "<table border=\"0\" cellpadding=\"0\" align=\"center\" cellspacing=\"0\" style=\"border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;\" width=\"100%\">");
foreach (var t in tv._children.OrderByDescending(x => x.addedAt.UnixTimeStampToDateTime())) foreach (var t in orderedTv)
{ {
var plexGUID = string.Empty; var plexGUID = string.Empty;
try try