mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 23:42:36 -07:00
!wip
This commit is contained in:
parent
b84f1aa2b6
commit
62a3ed924b
4 changed files with 29 additions and 2 deletions
|
@ -7,4 +7,3 @@
|
||||||
public string result { get; set; }
|
public string result { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -23,6 +23,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Ombi.Api.DogNzb\Ombi.Api.DogNzb.csproj" />
|
<ProjectReference Include="..\Ombi.Api.DogNzb\Ombi.Api.DogNzb.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.Api.Plex\Ombi.Api.Plex.csproj" />
|
<ProjectReference Include="..\Ombi.Api.Plex\Ombi.Api.Plex.csproj" />
|
||||||
|
<ProjectReference Include="..\Ombi.Api.SickRage\Ombi.Api.SickRage.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.Api.Sonarr\Ombi.Api.Sonarr.csproj" />
|
<ProjectReference Include="..\Ombi.Api.Sonarr\Ombi.Api.Sonarr.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.Api.Trakt\Ombi.Api.Trakt.csproj" />
|
<ProjectReference Include="..\Ombi.Api.Trakt\Ombi.Api.Trakt.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.Api.TvMaze\Ombi.Api.TvMaze.csproj" />
|
<ProjectReference Include="..\Ombi.Api.TvMaze\Ombi.Api.TvMaze.csproj" />
|
||||||
|
|
|
@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Ombi.Api.DogNzb;
|
using Ombi.Api.DogNzb;
|
||||||
using Ombi.Api.DogNzb.Models;
|
using Ombi.Api.DogNzb.Models;
|
||||||
|
using Ombi.Api.SickRage;
|
||||||
using Ombi.Api.Sonarr;
|
using Ombi.Api.Sonarr;
|
||||||
using Ombi.Api.Sonarr.Models;
|
using Ombi.Api.Sonarr.Models;
|
||||||
using Ombi.Core.Settings;
|
using Ombi.Core.Settings;
|
||||||
|
@ -17,20 +18,25 @@ namespace Ombi.Core.Senders
|
||||||
public class TvSender : ITvSender
|
public class TvSender : ITvSender
|
||||||
{
|
{
|
||||||
public TvSender(ISonarrApi sonarrApi, ILogger<TvSender> log, ISettingsService<SonarrSettings> sonarrSettings,
|
public TvSender(ISonarrApi sonarrApi, ILogger<TvSender> log, ISettingsService<SonarrSettings> sonarrSettings,
|
||||||
ISettingsService<DogNzbSettings> dog, IDogNzbApi dogApi)
|
ISettingsService<DogNzbSettings> dog, IDogNzbApi dogApi, ISettingsService<SickRageSettings> srSettings,
|
||||||
|
ISickRageApi srApi)
|
||||||
{
|
{
|
||||||
SonarrApi = sonarrApi;
|
SonarrApi = sonarrApi;
|
||||||
Logger = log;
|
Logger = log;
|
||||||
SonarrSettings = sonarrSettings;
|
SonarrSettings = sonarrSettings;
|
||||||
DogNzbSettings = dog;
|
DogNzbSettings = dog;
|
||||||
DogNzbApi = dogApi;
|
DogNzbApi = dogApi;
|
||||||
|
SickRageSettings = srSettings;
|
||||||
|
SickRageApi = srApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ISonarrApi SonarrApi { get; }
|
private ISonarrApi SonarrApi { get; }
|
||||||
private IDogNzbApi DogNzbApi { get; }
|
private IDogNzbApi DogNzbApi { get; }
|
||||||
|
private ISickRageApi SickRageApi { get; }
|
||||||
private ILogger<TvSender> Logger { get; }
|
private ILogger<TvSender> Logger { get; }
|
||||||
private ISettingsService<SonarrSettings> SonarrSettings { get; }
|
private ISettingsService<SonarrSettings> SonarrSettings { get; }
|
||||||
private ISettingsService<DogNzbSettings> DogNzbSettings { get; }
|
private ISettingsService<DogNzbSettings> DogNzbSettings { get; }
|
||||||
|
private ISettingsService<SickRageSettings> SickRageSettings { get; }
|
||||||
|
|
||||||
public async Task<SenderResult> Send(ChildRequests model)
|
public async Task<SenderResult> Send(ChildRequests model)
|
||||||
{
|
{
|
||||||
|
@ -240,6 +246,26 @@ namespace Ombi.Core.Senders
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task SendToSickRage(ChildRequests model, string qualityId = null)
|
||||||
|
{
|
||||||
|
var settings = await SickRageSettings.GetSettingsAsync();
|
||||||
|
if (qualityId.HasValue())
|
||||||
|
{
|
||||||
|
if (settings.Qualities.All(x => x.Key != qualityId))
|
||||||
|
{
|
||||||
|
qualityId = settings.QualityProfile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//var apiResult = SickRageApi.AddSeries(model.ParentRequest.TvDbId, model.SeasonCount, model.SeasonList, qualityId,
|
||||||
|
// sickRageSettings.ApiKey, sickRageSettings.FullUri);
|
||||||
|
|
||||||
|
//var result = apiResult.Result;
|
||||||
|
|
||||||
|
|
||||||
|
//return result;
|
||||||
|
}
|
||||||
|
|
||||||
private async Task SearchForRequest(ChildRequests model, IEnumerable<Episode> sonarrEpList, SonarrSeries existingSeries, SonarrSettings s,
|
private async Task SearchForRequest(ChildRequests model, IEnumerable<Episode> sonarrEpList, SonarrSeries existingSeries, SonarrSettings s,
|
||||||
IReadOnlyCollection<Episode> episodesToUpdate)
|
IReadOnlyCollection<Episode> episodesToUpdate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,6 +78,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Ombi.Api.Emby\Ombi.Api.Emby.csproj" />
|
<ProjectReference Include="..\Ombi.Api.Emby\Ombi.Api.Emby.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.Api.Github\Ombi.Api.Github.csproj" />
|
<ProjectReference Include="..\Ombi.Api.Github\Ombi.Api.Github.csproj" />
|
||||||
|
<ProjectReference Include="..\Ombi.Api.SickRage\Ombi.Api.SickRage.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.Core\Ombi.Core.csproj" />
|
<ProjectReference Include="..\Ombi.Core\Ombi.Core.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.DependencyInjection\Ombi.DependencyInjection.csproj" />
|
<ProjectReference Include="..\Ombi.DependencyInjection\Ombi.DependencyInjection.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.Mapping\Ombi.Mapping.csproj" />
|
<ProjectReference Include="..\Ombi.Mapping\Ombi.Mapping.csproj" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue