mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-25 22:37:27 -04:00
New: Many UI Updates and Performance Tweaks
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentValidation.Results;
|
||||
using NLog;
|
||||
@@ -39,20 +39,23 @@ namespace NzbDrone.Core.NetImport
|
||||
|
||||
public virtual ProviderMessage Message => null;
|
||||
|
||||
public virtual IEnumerable<ProviderDefinition> GetDefaultDefinitions()
|
||||
public virtual IEnumerable<ProviderDefinition> DefaultDefinitions
|
||||
{
|
||||
var config = (IProviderConfig)new TSettings();
|
||||
|
||||
yield return new NetImportDefinition
|
||||
get
|
||||
{
|
||||
Name = this.Name,
|
||||
Enabled = config.Validate().IsValid && Enabled,
|
||||
EnableAuto = true,
|
||||
ProfileId = 1,
|
||||
MinimumAvailability = MovieStatusType.Announced,
|
||||
Implementation = GetType().Name,
|
||||
Settings = config
|
||||
};
|
||||
var config = (IProviderConfig)new TSettings();
|
||||
|
||||
yield return new NetImportDefinition
|
||||
{
|
||||
Name = this.Name,
|
||||
Enabled = config.Validate().IsValid && Enabled,
|
||||
EnableAuto = true,
|
||||
ProfileId = 1,
|
||||
MinimumAvailability = MovieStatusType.Announced,
|
||||
Implementation = GetType().Name,
|
||||
Settings = config
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public virtual ProviderDefinition Definition { get; set; }
|
||||
|
||||
@@ -17,30 +17,33 @@ namespace NzbDrone.Core.NetImport.RSSImport
|
||||
: base(httpClient, configService, parsingService, logger)
|
||||
{ }
|
||||
|
||||
public override IEnumerable<ProviderDefinition> GetDefaultDefinitions()
|
||||
public override IEnumerable<ProviderDefinition> DefaultDefinitions
|
||||
{
|
||||
foreach (var def in base.GetDefaultDefinitions())
|
||||
get
|
||||
{
|
||||
yield return def;
|
||||
foreach (var def in base.DefaultDefinitions)
|
||||
{
|
||||
yield return def;
|
||||
}
|
||||
yield return new NetImportDefinition
|
||||
{
|
||||
Name = "IMDb List",
|
||||
Enabled = Enabled,
|
||||
EnableAuto = true,
|
||||
ProfileId = 1,
|
||||
Implementation = GetType().Name,
|
||||
Settings = new RSSImportSettings { Link = "https://rss.imdb.com/list/YOURLISTID" },
|
||||
};
|
||||
yield return new NetImportDefinition
|
||||
{
|
||||
Name = "IMDb Watchlist",
|
||||
Enabled = Enabled,
|
||||
EnableAuto = true,
|
||||
ProfileId = 1,
|
||||
Implementation = GetType().Name,
|
||||
Settings = new RSSImportSettings { Link = "https://rss.imdb.com/user/IMDBUSERID/watchlist" },
|
||||
};
|
||||
}
|
||||
yield return new NetImportDefinition
|
||||
{
|
||||
Name = "IMDb List",
|
||||
Enabled = Enabled,
|
||||
EnableAuto = true,
|
||||
ProfileId = 1,
|
||||
Implementation = GetType().Name,
|
||||
Settings = new RSSImportSettings { Link = "https://rss.imdb.com/list/YOURLISTID" },
|
||||
};
|
||||
yield return new NetImportDefinition
|
||||
{
|
||||
Name = "IMDb Watchlist",
|
||||
Enabled = Enabled,
|
||||
EnableAuto = true,
|
||||
ProfileId = 1,
|
||||
Implementation = GetType().Name,
|
||||
Settings = new RSSImportSettings { Link = "https://rss.imdb.com/user/IMDBUSERID/watchlist" },
|
||||
};
|
||||
}
|
||||
|
||||
public override INetImportRequestGenerator GetRequestGenerator()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Configuration;
|
||||
@@ -28,9 +28,11 @@ namespace NzbDrone.Core.NetImport.Radarr
|
||||
_httpClient = httpClient;
|
||||
}
|
||||
|
||||
public override IEnumerable<ProviderDefinition> GetDefaultDefinitions()
|
||||
public override IEnumerable<ProviderDefinition> DefaultDefinitions
|
||||
{
|
||||
foreach (var def in base.GetDefaultDefinitions())
|
||||
get
|
||||
{
|
||||
foreach (var def in base.DefaultDefinitions)
|
||||
{
|
||||
yield return def;
|
||||
}
|
||||
@@ -62,8 +64,7 @@ namespace NzbDrone.Core.NetImport.Radarr
|
||||
Implementation = GetType().Name,
|
||||
Settings = new RadarrSettings { Path = "/imdb/list?listId=LISTID" },
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override INetImportRequestGenerator GetRequestGenerator()
|
||||
@@ -81,4 +82,4 @@ namespace NzbDrone.Core.NetImport.Radarr
|
||||
return new RadarrParser(Settings, _skyhookProxy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user