diff --git a/packages/frontend/src/index.html b/packages/frontend/src/index.html
index 54059bfaf4..40e3cdf2ab 100644
--- a/packages/frontend/src/index.html
+++ b/packages/frontend/src/index.html
@@ -22,7 +22,7 @@
style-src 'self' 'unsafe-inline';
img-src 'self' data: blob: www.google.com xn--931a.moe launcher.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 activitypub.software secure.gravatar.com avatars.githubusercontent.com;
media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
- connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com;
+ connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com https://api.listenbrainz.org;
frame-src *;"
/>
diff --git a/packages/frontend/src/pages/user/home.vue b/packages/frontend/src/pages/user/home.vue
index 96ae4824f0..4a00b204c0 100644
--- a/packages/frontend/src/pages/user/home.vue
+++ b/packages/frontend/src/pages/user/home.vue
@@ -236,22 +236,24 @@ const moderationNote = ref(props.user.moderationNote);
const editModerationNote = ref(false);
const noteview = ref(null);
-let listenbrainzdata = false;
+const listenbrainzdata = ref(false);
if (props.user.listenbrainz) {
- try {
- const response = await fetch(`https://api.listenbrainz.org/1/user/${props.user.listenbrainz}/playing-now`, {
- method: 'GET',
- headers: {
- 'Content-Type': 'application/json'
- },
- });
- const data = await response.json();
- if (data.payload.listens && data.payload.listens.length !== 0) {
- listenbrainzdata = true;
+ (async function() {
+ try {
+ const response = await fetch(`https://api.listenbrainz.org/1/user/${props.user.listenbrainz}/playing-now`, {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ });
+ const data = await response.json();
+ if (data.payload.listens && data.payload.listens.length !== 0) {
+ listenbrainzdata.value = true;
+ }
+ } catch (err) {
+ listenbrainzdata.value = false;
}
- } catch (err) {
- listenbrainzdata = false;
- }
+ })()
}
const background = computed(() => {