This commit is contained in:
Jamie.Rees 2016-12-09 08:09:58 +00:00
commit 8acd6a2868

View file

@ -238,18 +238,22 @@ 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();
if (allRequests == null)
// foreach (var req in allRequests) {
// { return;
// if (req.PosterPath.Contains("https://image.tmdb.org/t/p/w150/")) }
// { var requestedModels = allRequests as RequestedModel[] ?? allRequests.ToArray();
// var newImg = req.PosterPath.Replace("https://image.tmdb.org/t/p/w150/", string.Empty); foreach (var req in requestedModels)
// req.PosterPath = newImg; {
// } if (req.PosterPath.Contains("https://image.tmdb.org/t/p/w150/"))
// } {
// RequestService.BatchUpdate(allRequests); var newImg = req.PosterPath.Replace("https://image.tmdb.org/t/p/w150/", string.Empty);
} req.PosterPath = newImg;
}
}
RequestService.BatchUpdate(requestedModels);
}
private void UpdateAdmin() private void UpdateAdmin()
{ {