Added missing parts on new website module code.

This commit is contained in:
Halhadus 2025-02-08 01:35:18 +03:00
parent 359b1507b8
commit e76b53fb58
2 changed files with 17 additions and 1 deletions

0
magiskmodule/system/bin/musiccombo Normal file → Executable file
View file

View file

@ -29,7 +29,6 @@ def musicstatus():
elif flask.request.method == 'GET':
current_playing = history[-1] if history else None
return flask.render_template_string('''
<!DOCTYPE html>
<html>
@ -38,6 +37,12 @@ def musicstatus():
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Halhadus' Music Status</title>
<link rel="icon" type="image/png" href="assets/favicon.png">
<meta name="description" content="Halhadus' Music Status">
<meta name="author" content="Halhadus">
<meta property="og:title" content="Halhadus' Music Status">
<meta property="og:description" content="Halhadus' Music Status">
<meta property="og:url" content="https://halhadus.rocks/musicstatus.html">
<style>
:root {
--bg-color: #1f1f1f;
@ -210,5 +215,16 @@ def verifycert():
return code
return "0"
@app.route('/<path:path>')
def catch_all(path):
if path == None:
return flask.redirect('https://halhadus.rocks')
if not path == 'musicstatus.html' or not path == 'verifykey':
return flask.redirect(f'https://halhadus.rocks/{path}')
@app.route('/')
def index():
return flask.redirect('https://halhadus.rocks')
if __name__ == '__main__':
app.run(host='0.0.0.0', port=int(os.environ.get('PORT')))