Added a media delete mechanism

This commit is contained in:
Bradley committed 2026-11-17 08:46:31 -05:00
1 parent 6c44950d23
commit a58903d58e
7 files changed
+490 -3

No files matched your search

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Delete Media - Sanctuary Commander</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<main class="container py-3">
<h1>Delete Media</h1>
{% if error %}
<div class="alert alert-danger" role="alert">{{ error }}</div>
{% endif %}
{% if media is defined %}
<p>Are you sure you want to delete <strong class="text-break">{{ media[1] }}</strong>?</p>
<div class="alert alert-warning">
<p>{{ plan.message }}</p>
<p class="mb-0">The media record and its playback options will be permanently removed. This cannot be undone.</p>
</div>
{% if media[3] == 1 or media[4] == 1 %}
<p>This item is active or marked as default. The player will select another active/default item, or a blank screen, on its next check.</p>
{% endif %}
<form method="POST" action="{{ url_for('media_library.delete_media', media_id=media[0]) }}">
<input type="hidden" name="version" value="{{ version }}">
<a class="btn btn-secondary" href="{{ url_for('media_library.media_list') }}">Cancel</a>
<button class="btn btn-danger" type="submit" name="confirm" value="yes">Yes, delete media</button>
</form>
{% else %}
<a class="btn btn-secondary" href="{{ url_for('media_library.media_list') }}">Return to media library</a>
{% endif %}
</main>
</body>
</html>