1
Fork 0

Make sure cover art is always https.

This commit is contained in:
Bauke 2022-03-28 15:14:05 +02:00
parent 4fe695f90c
commit 11a3a083db
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +64,7 @@ function insertHtml(listen, image) {
const text = `${listen.track_metadata.artist_name} - ${listen.track_metadata.track_name}`; const text = `${listen.track_metadata.artist_name} - ${listen.track_metadata.track_name}`;
const alt = image === undefined ? 'ListenBrainz Logo' : `${text} Cover Art`; const alt = image === undefined ? 'ListenBrainz Logo' : `${text} Cover Art`;
image = image.startsWith('http://') ? 'https' + image.slice(4) : image;
image = image ?? 'https://listenbrainz.org/static/img/logo_big.svg'; image = image ?? 'https://listenbrainz.org/static/img/logo_big.svg';
const listenHtml = `<p class="listenbrainz"> const listenHtml = `<p class="listenbrainz">