mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Fixed #748
This commit is contained in:
parent
7781a4ee2f
commit
8acd6a2868
1 changed files with 16 additions and 12 deletions
|
@ -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()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue