mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 11:38:32 -07:00
If Radarr/Sonarr has noticed that the media is available, then mark it as available in the UI
This commit is contained in:
parent
9d7a66b5fe
commit
a8bb352c34
9 changed files with 954 additions and 13 deletions
|
@ -25,6 +25,10 @@ namespace Ombi.Core.Rule.Rules.Search
|
|||
if (result != null)
|
||||
{
|
||||
obj.Approved = true; // It's in radarr so it's approved... Maybe have a new property called "Processing" or something?
|
||||
if (result.HasFile)
|
||||
{
|
||||
obj.Available = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Task.FromResult(Success());
|
||||
|
|
|
@ -67,12 +67,16 @@ namespace Ombi.Core.Rule.Rules
|
|||
foreach (var ep in season.Episodes)
|
||||
{
|
||||
// Check if we have it
|
||||
var monitoredInSonarr = sonarrEpisodes.Any(x =>
|
||||
var monitoredInSonarr = await sonarrEpisodes.FirstOrDefaultAsync(x =>
|
||||
x.EpisodeNumber == ep.EpisodeNumber && x.SeasonNumber == season.SeasonNumber
|
||||
&& x.TvDbId == vm.Id);
|
||||
if (monitoredInSonarr)
|
||||
if (monitoredInSonarr != null)
|
||||
{
|
||||
ep.Approved = true;
|
||||
if (monitoredInSonarr.HasFile)
|
||||
{
|
||||
obj.Available = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue