This commit is contained in:
Jamie 2017-11-09 14:22:22 +00:00
commit 874d90d894
4 changed files with 24 additions and 4 deletions

View file

@ -19,7 +19,19 @@ namespace Ombi.Core.Rule.Rules.Search
public async Task<RuleResult> Execute(SearchViewModel obj)
{
var item = await EmbyContentRepository.Get(obj.ImdbId);
EmbyContent item = null;
if (obj.Type == RequestType.Movie)
{
item = await EmbyContentRepository.Get(obj.ImdbId);
if (item == null)
{
item = await EmbyContentRepository.Get(obj.TheMovieDbId);
}
}
else
{
item = await EmbyContentRepository.Get(obj.TheTvDbId);
}
if (item != null)
{
obj.Available = true;