This commit is contained in:
Henry Jameson 2026-01-14 17:20:25 +02:00
commit 5554c4b4b6

View file

@ -100,12 +100,13 @@ const post = ({
credentials: 'include',
});
const scrobble = ({ title, external_link }) =>
const scrobble = ({ title, artist, external_link }) =>
fetch(`https://${instance}/api/v1/pleroma/scrobble`, {
headers: headers(userBearer),
referrerPolicy: 'same-origin',
body: JSON.stringify({
title,
artist,
external_link,
}),
method: 'POST',
@ -152,6 +153,7 @@ const loop = async () => {
const scrobbleResult = await scrobble({
// artist: 'Peertube',
title: 'Streaming on PeerTube',
artist: 'Peertube',
external_link: `https://tube.ebin.club/w/${videoId}`,
});
console.info('scrobble: ' + scrobbleResult.status);