added background property to tvrequests API (#2172)

* Added background property to TvRequests

* set background property for new requests and display in UI
This commit is contained in:
Anojh Thayaparan 2018-04-19 00:05:49 -07:00 committed by Jamie
parent bd741e053f
commit 025797c1ba
8 changed files with 1003 additions and 3 deletions

View file

@ -18,5 +18,19 @@ namespace Ombi.Helpers
return poster;
}
public static string FixBackgroundPath(string background)
{
// https://image.tmdb.org/t/p/w1280/fJAvGOitU8y53ByeHnM4avtKFaG.jpg
if (background.Contains("image.tmdb.org", CompareOptions.IgnoreCase))
{
// Somehow we have a full path here for the poster, we only want the last segment
var backgroundSegments = background.Split('/');
return backgroundSegments.Last();
}
return background;
}
}
}