mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Set default names for providers in Add Modals
This commit is contained in:
@@ -40,6 +40,10 @@ interface Indexer extends ModelBase {
|
|||||||
added: Date;
|
added: Date;
|
||||||
enable: boolean;
|
enable: boolean;
|
||||||
redirect: boolean;
|
redirect: boolean;
|
||||||
|
supportsRss: boolean;
|
||||||
|
supportsSearch: boolean;
|
||||||
|
supportsRedirect: boolean;
|
||||||
|
supportsPagination: boolean;
|
||||||
protocol: string;
|
protocol: string;
|
||||||
privacy: string;
|
privacy: string;
|
||||||
priority: number;
|
priority: number;
|
||||||
@@ -49,6 +53,7 @@ interface Indexer extends ModelBase {
|
|||||||
status: IndexerStatus;
|
status: IndexerStatus;
|
||||||
capabilities: IndexerCapabilities;
|
capabilities: IndexerCapabilities;
|
||||||
indexerUrls: string[];
|
indexerUrls: string[];
|
||||||
|
legacyUrls: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Indexer;
|
export default Indexer;
|
||||||
|
@@ -117,10 +117,7 @@ export default {
|
|||||||
|
|
||||||
[SELECT_APPLICATION_SCHEMA]: (state, { payload }) => {
|
[SELECT_APPLICATION_SCHEMA]: (state, { payload }) => {
|
||||||
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
||||||
selectedSchema.onGrab = selectedSchema.supportsOnGrab;
|
selectedSchema.name = selectedSchema.implementationName;
|
||||||
selectedSchema.onDownload = selectedSchema.supportsOnDownload;
|
|
||||||
selectedSchema.onUpgrade = selectedSchema.supportsOnUpgrade;
|
|
||||||
selectedSchema.onRename = selectedSchema.supportsOnRename;
|
|
||||||
|
|
||||||
return selectedSchema;
|
return selectedSchema;
|
||||||
});
|
});
|
||||||
|
@@ -142,6 +142,7 @@ export default {
|
|||||||
|
|
||||||
[SELECT_DOWNLOAD_CLIENT_SCHEMA]: (state, { payload }) => {
|
[SELECT_DOWNLOAD_CLIENT_SCHEMA]: (state, { payload }) => {
|
||||||
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
||||||
|
selectedSchema.name = selectedSchema.implementationName;
|
||||||
selectedSchema.enable = true;
|
selectedSchema.enable = true;
|
||||||
|
|
||||||
return selectedSchema;
|
return selectedSchema;
|
||||||
|
@@ -104,6 +104,8 @@ export default {
|
|||||||
|
|
||||||
[SELECT_INDEXER_PROXY_SCHEMA]: (state, { payload }) => {
|
[SELECT_INDEXER_PROXY_SCHEMA]: (state, { payload }) => {
|
||||||
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
||||||
|
selectedSchema.name = selectedSchema.implementationName;
|
||||||
|
|
||||||
return selectedSchema;
|
return selectedSchema;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -104,6 +104,7 @@ export default {
|
|||||||
|
|
||||||
[SELECT_NOTIFICATION_SCHEMA]: (state, { payload }) => {
|
[SELECT_NOTIFICATION_SCHEMA]: (state, { payload }) => {
|
||||||
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
return selectProviderSchema(state, section, payload, (selectedSchema) => {
|
||||||
|
selectedSchema.name = selectedSchema.implementationName;
|
||||||
selectedSchema.onGrab = selectedSchema.supportsOnGrab;
|
selectedSchema.onGrab = selectedSchema.supportsOnGrab;
|
||||||
selectedSchema.onApplicationUpdate = selectedSchema.supportsOnApplicationUpdate;
|
selectedSchema.onApplicationUpdate = selectedSchema.supportsOnApplicationUpdate;
|
||||||
|
|
||||||
|
@@ -13,6 +13,15 @@ export interface Field {
|
|||||||
interface Notification extends ModelBase {
|
interface Notification extends ModelBase {
|
||||||
enable: boolean;
|
enable: boolean;
|
||||||
name: string;
|
name: string;
|
||||||
|
onGrab: boolean;
|
||||||
|
onHealthIssue: boolean;
|
||||||
|
onHealthRestored: boolean;
|
||||||
|
includeHealthWarnings: boolean;
|
||||||
|
onApplicationUpdate: boolean;
|
||||||
|
supportsOnGrab: boolean;
|
||||||
|
supportsOnHealthIssue: boolean;
|
||||||
|
supportsOnHealthRestored: boolean;
|
||||||
|
supportsOnApplicationUpdate: boolean;
|
||||||
fields: Field[];
|
fields: Field[];
|
||||||
implementationName: string;
|
implementationName: string;
|
||||||
implementation: string;
|
implementation: string;
|
||||||
|
@@ -46,7 +46,6 @@ namespace NzbDrone.Core.Applications
|
|||||||
|
|
||||||
yield return new ApplicationDefinition
|
yield return new ApplicationDefinition
|
||||||
{
|
{
|
||||||
Name = GetType().Name,
|
|
||||||
SyncLevel = ApplicationSyncLevel.FullSync,
|
SyncLevel = ApplicationSyncLevel.FullSync,
|
||||||
Implementation = GetType().Name,
|
Implementation = GetType().Name,
|
||||||
Settings = config
|
Settings = config
|
||||||
|
@@ -27,20 +27,7 @@ namespace NzbDrone.Core.Download
|
|||||||
|
|
||||||
public virtual ProviderMessage Message => null;
|
public virtual ProviderMessage Message => null;
|
||||||
|
|
||||||
public IEnumerable<ProviderDefinition> DefaultDefinitions
|
public IEnumerable<ProviderDefinition> DefaultDefinitions => new List<ProviderDefinition>();
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var config = (IProviderConfig)new TSettings();
|
|
||||||
|
|
||||||
yield return new DownloadClientDefinition
|
|
||||||
{
|
|
||||||
Name = GetType().Name,
|
|
||||||
Implementation = GetType().Name,
|
|
||||||
Settings = config
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProviderDefinition Definition { get; set; }
|
public ProviderDefinition Definition { get; set; }
|
||||||
|
|
||||||
|
@@ -14,20 +14,7 @@ namespace NzbDrone.Core.IndexerProxies
|
|||||||
|
|
||||||
public Type ConfigContract => typeof(TSettings);
|
public Type ConfigContract => typeof(TSettings);
|
||||||
|
|
||||||
public IEnumerable<ProviderDefinition> DefaultDefinitions
|
public IEnumerable<ProviderDefinition> DefaultDefinitions => new List<ProviderDefinition>();
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var config = (IProviderConfig)new TSettings();
|
|
||||||
|
|
||||||
yield return new IndexerProxyDefinition
|
|
||||||
{
|
|
||||||
Name = GetType().Name,
|
|
||||||
Implementation = GetType().Name,
|
|
||||||
Settings = config
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProviderDefinition Definition { get; set; }
|
public ProviderDefinition Definition { get; set; }
|
||||||
public abstract ValidationResult Test();
|
public abstract ValidationResult Test();
|
||||||
|
Reference in New Issue
Block a user