New: Add default urls to applications

pull/1618/head
Bogdan 1 year ago
parent 88fbc30be2
commit 9bbe51253b

@ -19,10 +19,12 @@ namespace NzbDrone.Core.Applications.LazyLibrarian
public class LazyLibrarianSettings : IApplicationSettings public class LazyLibrarianSettings : IApplicationSettings
{ {
private static readonly LazyLibrarianSettingsValidator Validator = new LazyLibrarianSettingsValidator(); private static readonly LazyLibrarianSettingsValidator Validator = new ();
public LazyLibrarianSettings() public LazyLibrarianSettings()
{ {
ProwlarrUrl = "http://localhost:9696";
BaseUrl = "http://localhost:5299";
SyncCategories = new[] SyncCategories = new[]
{ {
NewznabStandardCategory.AudioAudiobook.Id, NewznabStandardCategory.AudioAudiobook.Id,

@ -18,10 +18,12 @@ namespace NzbDrone.Core.Applications.Lidarr
public class LidarrSettings : IApplicationSettings public class LidarrSettings : IApplicationSettings
{ {
private static readonly LidarrSettingsValidator Validator = new LidarrSettingsValidator(); private static readonly LidarrSettingsValidator Validator = new ();
public LidarrSettings() public LidarrSettings()
{ {
ProwlarrUrl = "http://localhost:9696";
BaseUrl = "http://localhost:8686";
SyncCategories = new[] { 3000, 3010, 3030, 3040, 3050, 3060 }; SyncCategories = new[] { 3000, 3010, 3030, 3040, 3050, 3060 };
} }

@ -19,10 +19,12 @@ namespace NzbDrone.Core.Applications.Mylar
public class MylarSettings : IApplicationSettings public class MylarSettings : IApplicationSettings
{ {
private static readonly MylarSettingsValidator Validator = new MylarSettingsValidator(); private static readonly MylarSettingsValidator Validator = new ();
public MylarSettings() public MylarSettings()
{ {
ProwlarrUrl = "http://localhost:9696";
BaseUrl = "http://localhost:8090";
SyncCategories = new[] { NewznabStandardCategory.BooksComics.Id }; SyncCategories = new[] { NewznabStandardCategory.BooksComics.Id };
} }

@ -19,10 +19,12 @@ namespace NzbDrone.Core.Applications.Radarr
public class RadarrSettings : IApplicationSettings public class RadarrSettings : IApplicationSettings
{ {
private static readonly RadarrSettingsValidator Validator = new RadarrSettingsValidator(); private static readonly RadarrSettingsValidator Validator = new ();
public RadarrSettings() public RadarrSettings()
{ {
ProwlarrUrl = "http://localhost:9696";
BaseUrl = "http://localhost:7878";
SyncCategories = new[] { 2000, 2010, 2020, 2030, 2040, 2045, 2050, 2060, 2070, 2080 }; SyncCategories = new[] { 2000, 2010, 2020, 2030, 2040, 2045, 2050, 2060, 2070, 2080 };
} }

@ -19,10 +19,12 @@ namespace NzbDrone.Core.Applications.Readarr
public class ReadarrSettings : IApplicationSettings public class ReadarrSettings : IApplicationSettings
{ {
private static readonly ReadarrSettingsValidator Validator = new ReadarrSettingsValidator(); private static readonly ReadarrSettingsValidator Validator = new ();
public ReadarrSettings() public ReadarrSettings()
{ {
ProwlarrUrl = "http://localhost:9696";
BaseUrl = "http://localhost:8787";
SyncCategories = new[] { 3030, 7000, 7010, 7020, 7030, 7040, 7050, 7060 }; SyncCategories = new[] { 3030, 7000, 7010, 7020, 7030, 7040, 7050, 7060 };
} }

@ -18,10 +18,12 @@ namespace NzbDrone.Core.Applications.Sonarr
public class SonarrSettings : IApplicationSettings public class SonarrSettings : IApplicationSettings
{ {
private static readonly SonarrSettingsValidator Validator = new SonarrSettingsValidator(); private static readonly SonarrSettingsValidator Validator = new ();
public SonarrSettings() public SonarrSettings()
{ {
ProwlarrUrl = "http://localhost:9696";
BaseUrl = "http://localhost:8989";
SyncCategories = new[] { 5000, 5010, 5020, 5030, 5040, 5045, 5050 }; SyncCategories = new[] { 5000, 5010, 5020, 5030, 5040, 5045, 5050 };
AnimeSyncCategories = new[] { 5070 }; AnimeSyncCategories = new[] { 5070 };
} }
@ -35,12 +37,12 @@ namespace NzbDrone.Core.Applications.Sonarr
[FieldDefinition(2, Label = "ApiKey", Privacy = PrivacyLevel.ApiKey, HelpText = "The ApiKey generated by Sonarr in Settings/General")] [FieldDefinition(2, Label = "ApiKey", Privacy = PrivacyLevel.ApiKey, HelpText = "The ApiKey generated by Sonarr in Settings/General")]
public string ApiKey { get; set; } public string ApiKey { get; set; }
[FieldDefinition(3, Label = "Sync Categories", Type = FieldType.Select, SelectOptions = typeof(NewznabCategoryFieldConverter), Advanced = true, HelpText = "Only Indexers that support these categories will be synced")]
public IEnumerable<int> SyncCategories { get; set; }
[FieldDefinition(4, Label = "Anime Sync Categories", Type = FieldType.Select, SelectOptions = typeof(NewznabCategoryFieldConverter), Advanced = true, HelpText = "Only Indexers that support these categories will be synced")] [FieldDefinition(4, Label = "Anime Sync Categories", Type = FieldType.Select, SelectOptions = typeof(NewznabCategoryFieldConverter), Advanced = true, HelpText = "Only Indexers that support these categories will be synced")]
public IEnumerable<int> AnimeSyncCategories { get; set; } public IEnumerable<int> AnimeSyncCategories { get; set; }
[FieldDefinition(3, Label = "Sync Categories", Type = FieldType.Select, SelectOptions = typeof(NewznabCategoryFieldConverter), Advanced = true, HelpText = "Only Indexers that support these categories will be synced")]
public IEnumerable<int> SyncCategories { get; set; }
public NzbDroneValidationResult Validate() public NzbDroneValidationResult Validate()
{ {
return new NzbDroneValidationResult(Validator.Validate(this)); return new NzbDroneValidationResult(Validator.Validate(this));

@ -19,10 +19,12 @@ namespace NzbDrone.Core.Applications.Whisparr
public class WhisparrSettings : IApplicationSettings public class WhisparrSettings : IApplicationSettings
{ {
private static readonly WhisparrSettingsValidator Validator = new WhisparrSettingsValidator(); private static readonly WhisparrSettingsValidator Validator = new ();
public WhisparrSettings() public WhisparrSettings()
{ {
ProwlarrUrl = "http://localhost:9696";
BaseUrl = "http://localhost:6969";
SyncCategories = new[] { 6000, 6010, 6020, 6030, 6040, 6045, 6050, 6070, 6080, 6090 }; SyncCategories = new[] { 6000, 6010, 6020, 6030, 6040, 6045, 6050, 6070, 6080, 6090 };
} }

Loading…
Cancel
Save