added playlist view

This commit is contained in:
cool.gitter.choco
2025-02-03 20:22:07 -06:00
parent 051fe4de31
commit 0a356a3e67
12 changed files with 839 additions and 62 deletions

12
app.py
View File

@@ -16,7 +16,7 @@ def create_app():
app = Flask(__name__)
# Configure basic logging
log_file='flask_server.log'
log_file = 'flask_server.log'
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(levelname)s %(name)s %(threadName)s : %(message)s',
@@ -48,11 +48,17 @@ def create_app():
def serve_index():
return render_template('main.html')
# Add this new route for config page
# Config page route
@app.route('/config')
def serve_config():
return render_template('config.html')
# New route: Serve playlist.html under /playlist/<id>
@app.route('/playlist/<id>')
def serve_playlist(id):
# The id parameter is captured, but you can use it as needed.
return render_template('playlist.html')
@app.route('/static/<path:path>')
def serve_static(path):
return send_from_directory('static', path)
@@ -90,4 +96,4 @@ if __name__ == '__main__':
app = create_app()
logging.info("Starting Flask server on port 7171")
from waitress import serve
serve(app, host='0.0.0.0', port=7171)
serve(app, host='0.0.0.0', port=7171)