pull/758/head
Jamie.Rees 8 years ago
parent 7781a4ee2f
commit 8acd6a2868

@ -238,18 +238,22 @@ namespace PlexRequests.Core.Migration.Migrations
// UI = https://image.tmdb.org/t/p/w150/{{posterPath}}
// Update old invalid posters
// 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);
}
var allRequests = RequestService.GetAll();
if (allRequests == null)
{
return;
}
var requestedModels = allRequests as RequestedModel[] ?? allRequests.ToArray();
foreach (var req in requestedModels)
{
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(requestedModels);
}
private void UpdateAdmin()
{

Loading…
Cancel
Save