Add polling
Docker Build and Push / build-and-push (push) Successful in 1m34s

This commit is contained in:
2026-02-05 14:20:03 +03:00
parent 7dee8e46da
commit f23117413c
4 changed files with 29 additions and 2 deletions
+12
View File
@@ -72,3 +72,15 @@ def index():
tmsmp=tmsmp, tmsmp=tmsmp,
rtmsmp=rtmsmp rtmsmp=rtmsmp
) )
@bp.route("/m/<module>")
def module(module):
return render_tmpl(
f'{module}.htm',
lb=listens,
lb_now=listening,
recent=recent.get('data', {}),
owned=owned.get('data', {}),
tmsmp=tmsmp,
rtmsmp=rtmsmp
)
@@ -11,6 +11,11 @@
data-site-id="1" data-site-id="1"
defer defer
></script> ></script>
<script
src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"
integrity="sha384-/TgkGk7p307TH7EXJDuUlgG3Ce1UVolAOFopFekQkkXihi5u/6OCvVKyz1W+idaz"
crossorigin="anonymous"
></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head> </head>
<body> <body>
@@ -10,7 +10,12 @@
</div> </div>
{% endmacro %} {% endmacro %}
<div class="block"> <div
class="block"
hx-get="/m/listenbrainz"
hx-trigger="every 15s"
hx-swap="outerHTML"
>
<h2><a href="https://listenbrainz.org/user/risdeveau/">Listenbrainz</a></h2> <h2><a href="https://listenbrainz.org/user/risdeveau/">Listenbrainz</a></h2>
{% if lb_now.data and lb_now.data.listens.0 %} {% if lb_now.data and lb_now.data.listens.0 %}
{{ track_block(lb_now.data.listens.0, is_active=true) }} {{ track_block(lb_now.data.listens.0, is_active=true) }}
+6 -1
View File
@@ -1,4 +1,9 @@
<div class="block steam"> <div
class="block steam"
hx-get="/m/steam"
hx-trigger="every 1m"
hx-swap="outerHTML"
>
<h2><a href="https://steamcommunity.com/id/risdeveau">Steam</a></h2> <h2><a href="https://steamcommunity.com/id/risdeveau">Steam</a></h2>
{% if recent.games %} {% if recent.games %}