updated 3
This commit is contained in:
BIN
__pycache__/extensions.cpython-312.pyc
Normal file
BIN
__pycache__/extensions.cpython-312.pyc
Normal file
Binary file not shown.
BIN
__pycache__/models.cpython-312.pyc
Normal file
BIN
__pycache__/models.cpython-312.pyc
Normal file
Binary file not shown.
2
app.py
2
app.py
@@ -288,6 +288,8 @@ def edit_player(player_id):
|
||||
player.hostname = request.form['hostname']
|
||||
if request.form['password']:
|
||||
player.password = bcrypt.generate_password_hash(request.form['password']).decode('utf-8')
|
||||
if request.form['quickconnect_password']:
|
||||
player.quickconnect_password = bcrypt.generate_password_hash(request.form['quickconnect_password']).decode('utf-8')
|
||||
db.session.commit()
|
||||
return redirect(url_for('player_page', player_id=player.id))
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 153 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 52 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB |
@@ -1,15 +1,42 @@
|
||||
<form method="POST">
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Group Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" required>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Create Group</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
body.dark-mode {
|
||||
background-color: #121212;
|
||||
color: #ffffff;
|
||||
}
|
||||
.card.dark-mode {
|
||||
background-color: #1e1e1e;
|
||||
color: #ffffff;
|
||||
}
|
||||
.dark-mode label, .dark-mode th, .dark-mode td {
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="{{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="container py-5">
|
||||
<h1 class="text-center mb-4">Create Group</h1>
|
||||
<form method="POST" action="{{ url_for('create_group') }}">
|
||||
<div class="mb-3">
|
||||
<label for="name" class="form-label">Group Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="players" class="form-label">Select Players</label>
|
||||
<select multiple class="form-control" id="players" name="players">
|
||||
{% for player in players %}
|
||||
<option value="{{ player.id }}">{{ player.username }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Create Group</button>
|
||||
</form>
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary mt-3">Back to Dashboard</a>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="players" class="form-label">Select Players</label>
|
||||
<select multiple class="form-control" id="players" name="players">
|
||||
{% for player in players %}
|
||||
<option value="{{ player.id }}">{{ player.username }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Create Group</button>
|
||||
</form>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -33,6 +33,10 @@
|
||||
<label for="password" class="form-label">Password (leave blank to keep current password)</label>
|
||||
<input type="password" class="form-control {% if theme == 'dark' %}dark-mode{% endif %}" id="password" name="password">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="quickconnect_password" class="form-label">Quick Connect Password (leave blank to keep current password)</label>
|
||||
<input type="password" class="form-control {% if theme == 'dark' %}dark-mode{% endif %}" id="quickconnect_password" name="quickconnect_password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Update Player</button>
|
||||
</form>
|
||||
<a href="{{ return_url }}" class="btn btn-secondary mt-3">Back to Player Page</a>
|
||||
|
||||
69
templates/group_fullscreen.html
Normal file
69
templates/group_fullscreen.html
Normal file
@@ -0,0 +1,69 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Group Fullscreen</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
background-color: black;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.content-item {
|
||||
display: none;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
object-fit: cover;
|
||||
}
|
||||
.content-item.active {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
{% for item in content %}
|
||||
{% if item.file_name.endswith('.mp4') %}
|
||||
<video class="content-item" data-duration="{{ item.duration }}" controls>
|
||||
<source src="{{ url_for('static', filename='uploads/' ~ item.file_name) }}" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
{% elif item.file_name.endswith('.pdf') %}
|
||||
<object data="{{ url_for('static', filename='uploads/' ~ item.file_name) }}" type="application/pdf" class="content-item" data-duration="{{ item.duration }}"></object>
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='uploads/' ~ item.file_name) }}" class="content-item" data-duration="{{ item.duration }}" alt="{{ item.file_name }}">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const items = document.querySelectorAll('.content-item');
|
||||
let currentIndex = 0;
|
||||
|
||||
function showNextItem() {
|
||||
items.forEach(item => item.classList.remove('active'));
|
||||
const currentItem = items[currentIndex];
|
||||
currentItem.classList.add('active');
|
||||
|
||||
const duration = parseInt(currentItem.getAttribute('data-duration'), 10) * 1000;
|
||||
if (currentItem.tagName === 'VIDEO') {
|
||||
currentItem.play();
|
||||
currentItem.onended = () => {
|
||||
currentIndex = (currentIndex + 1) % items.length;
|
||||
showNextItem();
|
||||
};
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
currentIndex = (currentIndex + 1) % items.length;
|
||||
showNextItem();
|
||||
}, duration);
|
||||
}
|
||||
}
|
||||
|
||||
showNextItem();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,9 +2,9 @@ import requests
|
||||
import os
|
||||
|
||||
# Replace with the actual server IP address or domain name, hostname, and quick connect code
|
||||
server_ip = 'http://192.168.0.115:5000'
|
||||
hostname = 'TvHolBa1'
|
||||
quickconnect_code = 'Initial01!'
|
||||
server_ip = 'http://localhost:5000'
|
||||
hostname = 'tv1'
|
||||
quickconnect_code = '4321'
|
||||
|
||||
# Construct the URL with the hostname and quick connect code as query parameters
|
||||
url = f'{server_ip}/api/playlists'
|
||||
|
||||
Reference in New Issue
Block a user