Added settings for radarr and sonarr addresses

This commit is contained in:
2026-02-14 16:18:11 -07:00
parent bc7c95af08
commit 61e868bfa2
2 changed files with 48 additions and 0 deletions

View File

@@ -17,11 +17,31 @@ public class PluginConfiguration : BasePluginConfiguration
{
}
/// <summary>
/// Gets or sets the http address for your Radarr instance.
/// </summary>
public string RadarrHTTPAddress { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the port for your Radarr instance.
/// </summary>
public string RadarrPort { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the api for your Radarr instance.
/// </summary>
public string RadarrAPIKey { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the http address for your Sonarr instance.
/// </summary>
public string SonarrHTTPAddress { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the port for your Sonarr instance.
/// </summary>
public string SonarrPort { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the api for your Sonarr instance.
/// </summary>

View File

@@ -9,11 +9,31 @@
<div data-role="content">
<div class="content-primary">
<form id="MediaCleanerConfigForm">
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="RadarrHTTPAddress">Radarr Address (http)</label>
<input id="RadarrHTTPAddress" name="RadarrHTTPAddress" type="text" is="emby-input" />
<div class="fieldDescription">The http address of your radarr instance.</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="RadarrPort">Radarr Port</label>
<input id="RadarrPort" name="RadarrPort" type="text" is="emby-input" />
<div class="fieldDescription">The port of your radarr instance.</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="RadarrAPIKey">Radarr API Key</label>
<input id="RadarrAPIKey" name="RadarrAPIKey" type="text" is="emby-input" />
<div class="fieldDescription">The api key used by your radarr instance</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="SonarrHTTPAddress">Sonarr Address (http)</label>
<input id="SonarrHTTPAddress" name="SonarrHTTPAddress" type="text" is="emby-input" />
<div class="fieldDescription">The http address of your sonarr instance.</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="SonarrPort">Sonarr Port</label>
<input id="SonarrPort" name="SonarrPort" type="text" is="emby-input" />
<div class="fieldDescription">The port of your sonarr instance.</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="SonarrAPIKey">Sonarr API Key</label>
<input id="SonarrAPIKey" name="SonarrAPIKey" type="text" is="emby-input" />
@@ -74,7 +94,11 @@
// document.querySelector('#AnInteger').value = config.AnInteger;
// document.querySelector('#TrueFalseSetting').checked = config.TrueFalseSetting;
// document.querySelector('#AString').value = config.AString;
document.querySelector('#RadarrHTTPAddress').value = config.RadarrHTTPAddress;
document.querySelector('#RadarrPort').value = config.RadarrPort;
document.querySelector('#RadarrAPIKey').value = config.RadarrAPIKey;
document.querySelector('#SonarrHTTPAddress').value = config.SonarrHTTPAddress;
document.querySelector('#SonarrPort').value = config.SonarrPort;
document.querySelector('#SonarrAPIKey').value = config.SonarrAPIKey;
document.querySelector('#StaleMediaCutoff').value = config.StaleMediaCutoff;
document.querySelector('#DebugMode').checked = config.DebugMode;
@@ -90,7 +114,11 @@
// config.AnInteger = document.querySelector('#AnInteger').value;
// config.TrueFalseSetting = document.querySelector('#TrueFalseSetting').checked;
// config.AString = document.querySelector('#AString').value;
config.RadarrHTTPAddress = document.querySelector('#RadarrHTTPAddress').value;
config.RadarrPort = document.querySelector('#RadarrPort').value;
config.RadarrAPIKey = document.querySelector('#RadarrAPIKey').value;
config.SonarrHTTPAddress = document.querySelector('#SonarrHTTPAddress').value;
config.SonarrPort = document.querySelector('#SonarrPort').value;
config.SonarrAPIKey = document.querySelector('#SonarrAPIKey').value;
config.StaleMediaCutoff = document.querySelector('#StaleMediaCutoff').value;
config.DebugMode = document.querySelector('#DebugMode').checked;