Enabled live-view without the need for OCR to be enabled for screen sharing within the flyff_character_status_node.py node.

This commit is contained in:
2025-03-10 05:37:44 -06:00
parent 7d39baad90
commit 7991aa751f
2 changed files with 27 additions and 22 deletions

View File

@ -71,7 +71,7 @@ def fp_api():
"fp_total": get_data()["fp_total"]
})
@app.route('/status_screenshot')
@app.route('/flyff/status')
def status_screenshot():
"""
Returns an HTML page that displays the stored screenshot and
@ -80,23 +80,23 @@ def status_screenshot():
html = """
<html>
<head>
<title>Live Flyff Character Status</title>
<title>Borealis - Live Status</title>
<script>
// Reload the <img> every second
setInterval(function(){
var img = document.getElementById('status_img');
img.src = '/status_screenshot_data?random=' + Math.random();
img.src = '/flyff/status_rawdata?random=' + Math.random();
}, 1000);
</script>
</head>
<body>
<img id="status_img" src="/status_screenshot_data" />
<img id="status_img" src="/flyff/status_rawdata" />
</body>
</html>
"""
return html
@app.route('/status_screenshot_data')
@app.route('/flyff/status_rawdata')
def status_screenshot_data():
"""
Serves the raw PNG bytes (decoded from base64) used by <img> in /status_screenshot.