feat: added lidarr support

This commit is contained in:
Kamil
2024-12-03 23:11:05 +00:00
parent 87791cf21d
commit b861a1a8f4
12 changed files with 570 additions and 59 deletions

View File

@@ -11,6 +11,9 @@
<li class="nav-item">
<a class="nav-link" href="/admin/tasks">Tasks</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/admin/lidarr">Lidarr</a>
</li>
</ul>
</div>

View File

@@ -0,0 +1,32 @@
{% extends "admin.html" %}
{% block admin_content %}
<div class="container mt-5">
<h1>Lidarr Configuration</h1>
{% if error %}
<div class="alert alert-danger" role="alert">
{{ error }}
</div>
{% else %}
<form id="lidarrConfigForm" method="POST" action="{{ url_for('save_lidarr_config') }}">
<div class="mb-3">
<label for="qualityProfile" class="form-label">Default Quality Profile</label>
<select class="form-select" id="qualityProfile" name="qualityProfile" required>
{% for profile in quality_profiles %}
<option value="{{ profile.id }}" {% if profile.id == current_quality_profile|int %}selected{% endif %}>{{ profile.name }}</option>
{% endfor %}
</select>
</div>
<div class="mb-3">
<label for="rootFolder" class="form-label">Default Root Folder</label>
<select class="form-select" id="rootFolder" name="rootFolder" required>
{% for folder in root_folders %}
<option value="{{ folder.path }}" {% if folder.path == current_root_folder %}selected{% endif %}>{{ folder.path }}</option>
{% endfor %}
</select>
</div>
<button type="submit" class="btn btn-primary">Save</button>
</form>
{% endif %}
</div>
{% endblock %}