2023-03-13 06:41:35 +00:00
|
|
|
using NLog;
|
|
|
|
using NzbDrone.Common.Http;
|
|
|
|
using NzbDrone.Core.Configuration;
|
|
|
|
using NzbDrone.Core.Parser;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.ImportLists.Rss
|
|
|
|
{
|
|
|
|
public abstract class RssImportBase<TSettings> : HttpImportListBase<TSettings>
|
2024-04-14 04:16:26 +00:00
|
|
|
where TSettings : RssImportBaseSettings<TSettings>, new()
|
2023-03-13 06:41:35 +00:00
|
|
|
{
|
|
|
|
public override bool Enabled => true;
|
|
|
|
public override bool EnableAuto => false;
|
|
|
|
|
|
|
|
public RssImportBase(IHttpClient httpClient,
|
|
|
|
IImportListStatusService importListStatusService,
|
|
|
|
IConfigService configService,
|
|
|
|
IParsingService parsingService,
|
|
|
|
Logger logger)
|
|
|
|
: base(httpClient, importListStatusService, configService, parsingService, logger)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public override ImportListFetchResult Fetch()
|
|
|
|
{
|
2023-09-02 23:25:32 +00:00
|
|
|
return FetchMovies(g => g.GetMovies());
|
2023-03-13 06:41:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public override IParseImportListResponse GetParser()
|
|
|
|
{
|
|
|
|
return new RssImportBaseParser(_logger);
|
|
|
|
}
|
|
|
|
|
|
|
|
public override IImportListRequestGenerator GetRequestGenerator()
|
|
|
|
{
|
2024-04-14 04:16:26 +00:00
|
|
|
return new RssImportRequestGenerator<TSettings>
|
2023-03-13 06:41:35 +00:00
|
|
|
{
|
|
|
|
Settings = Settings
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|