updated to 4k images from pptx

This commit is contained in:
2025-08-01 10:23:38 +03:00
parent c8bbbebb48
commit 1326543418
9 changed files with 82 additions and 30 deletions

19
app.py
View File

@@ -327,7 +327,8 @@ def edit_player(player_id):
hostname = request.form['hostname']
password = request.form['password'] if request.form['password'] else None
quickconnect_password = request.form['quickconnect_password'] if request.form['quickconnect_password'] else None
edit_player_util(player_id, username, hostname, password, quickconnect_password)
orientation = request.form.get('orientation', player.orientation) # <-- Get orientation
edit_player_util(player_id, username, hostname, password, quickconnect_password, orientation) # <-- Pass orientation
flash(f'Player "{username}" updated successfully.', 'success')
return redirect(url_for('player_page', player_id=player.id))
@@ -648,14 +649,14 @@ def create_admin(username, password):
from models.create_default_user import create_default_user
with app.app_context():
try:
db.session.execute(db.select(User).limit(1))
except Exception as e:
print("Database not initialized or missing tables. Re-initializing...")
db.create_all()
# Always ensure default user exists
create_default_user(db, User, bcrypt)
if not app.debug or os.environ.get('WERKZEUG_RUN_MAIN') == 'true':
with app.app_context():
try:
db.session.execute(db.select(User).limit(1))
except Exception as e:
print("Database not initialized or missing tables. Re-initializing...")
db.create_all()
create_default_user(db, User, bcrypt)
# Add this at the end of app.py
if __name__ == '__main__':