mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
77 lines
3 KiB
HTML
Executable file
77 lines
3 KiB
HTML
Executable file
{% extends "base.html" %}
|
|
{% block title %}Settings - Dispatcharr{% endblock %}
|
|
{% block page_header %}Settings{% endblock %}
|
|
{% block breadcrumb %}
|
|
<li class="breadcrumb-item"><a href="{% url 'dashboard' %}">Home</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">Settings</li>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<form id="settingsForm">
|
|
<div class="card mb-4">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Schedule Direct Settings</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="mb-3">
|
|
<label for="schedulesDirectUsername" class="form-label">Schedules Direct Username</label>
|
|
<input type="text" class="form-control" id="schedulesDirectUsername" name="schedules_direct_username" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="schedulesDirectPassword" class="form-label">Schedules Direct Password</label>
|
|
<input type="password" class="form-control" id="schedulesDirectPassword" name="schedules_direct_password" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="schedulesDirectAPIKey" class="form-label">Schedules Direct API Key</label>
|
|
<input type="text" class="form-control" id="schedulesDirectAPIKey" name="schedules_direct_api_key">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="schedulesDirectUpdateFrequency" class="form-label">Update Frequency</label>
|
|
<select class="form-select" id="schedulesDirectUpdateFrequency" name="schedules_direct_update_frequency">
|
|
<option value="daily">Daily</option>
|
|
<option value="12h">Every 12 Hours</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card mb-4">
|
|
<div class="card-header">
|
|
<h3 class="card-title">FFmpeg Settings</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="mb-3">
|
|
<label for="ffmpegPath" class="form-label">FFmpeg Path</label>
|
|
<input type="text" class="form-control" id="ffmpegPath" name="ffmpeg_path" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="customTranscodingFlags" class="form-label">Custom Transcoding Flags</label>
|
|
<textarea class="form-control" id="customTranscodingFlags" name="custom_transcoding_flags"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-footer">
|
|
<button type="submit" class="btn btn-success">Save Settings</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|
|
{% block extra_js %}
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function(){
|
|
document.getElementById("settingsForm").addEventListener("submit", function(e){
|
|
e.preventDefault();
|
|
fetch("{% url 'api:settings-update' %}", {
|
|
method: "POST",
|
|
headers: {"Content-Type": "application/x-www-form-urlencoded"},
|
|
body: new URLSearchParams(new FormData(this))
|
|
}).then(response => {
|
|
if(response.ok){
|
|
Swal.fire("Success", "Settings updated!", "success");
|
|
} else {
|
|
Swal.fire("Error", "Failed to update settings.", "error");
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|