mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 03:28:28 -07:00
Small fix around the detection of available Jellyfin movies
This commit is contained in:
parent
924a562c57
commit
0efb55793d
1 changed files with 14 additions and 0 deletions
|
@ -28,6 +28,7 @@ namespace Ombi.Core.Rule.Rules.Search
|
||||||
var useImdb = false;
|
var useImdb = false;
|
||||||
var useTheMovieDb = false;
|
var useTheMovieDb = false;
|
||||||
var useTvDb = false;
|
var useTvDb = false;
|
||||||
|
var useId = false;
|
||||||
|
|
||||||
if (obj.ImdbId.HasValue())
|
if (obj.ImdbId.HasValue())
|
||||||
{
|
{
|
||||||
|
@ -39,6 +40,14 @@ namespace Ombi.Core.Rule.Rules.Search
|
||||||
}
|
}
|
||||||
if (item == null)
|
if (item == null)
|
||||||
{
|
{
|
||||||
|
if (obj.Id > 0)
|
||||||
|
{
|
||||||
|
item = await JellyfinContentRepository.GetByTheMovieDbId(obj.Id.ToString());
|
||||||
|
if (item != null)
|
||||||
|
{
|
||||||
|
useId = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (obj.TheMovieDbId.HasValue())
|
if (obj.TheMovieDbId.HasValue())
|
||||||
{
|
{
|
||||||
item = await JellyfinContentRepository.GetByTheMovieDbId(obj.TheMovieDbId);
|
item = await JellyfinContentRepository.GetByTheMovieDbId(obj.TheMovieDbId);
|
||||||
|
@ -63,6 +72,11 @@ namespace Ombi.Core.Rule.Rules.Search
|
||||||
|
|
||||||
if (item != null)
|
if (item != null)
|
||||||
{
|
{
|
||||||
|
if (useId)
|
||||||
|
{
|
||||||
|
obj.TheMovieDbId = obj.Id.ToString();
|
||||||
|
useTheMovieDb = true;
|
||||||
|
}
|
||||||
obj.Available = true;
|
obj.Available = true;
|
||||||
var s = await JellyfinSettings.GetSettingsAsync();
|
var s = await JellyfinSettings.GetSettingsAsync();
|
||||||
if (s.Enable)
|
if (s.Enable)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue