fix
This commit is contained in:
parent
c4763b9aa2
commit
5554c4b4b6
1 changed files with 3 additions and 1 deletions
4
index.js
4
index.js
|
|
@ -100,12 +100,13 @@ const post = ({
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
});
|
});
|
||||||
|
|
||||||
const scrobble = ({ title, external_link }) =>
|
const scrobble = ({ title, artist, external_link }) =>
|
||||||
fetch(`https://${instance}/api/v1/pleroma/scrobble`, {
|
fetch(`https://${instance}/api/v1/pleroma/scrobble`, {
|
||||||
headers: headers(userBearer),
|
headers: headers(userBearer),
|
||||||
referrerPolicy: 'same-origin',
|
referrerPolicy: 'same-origin',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
title,
|
title,
|
||||||
|
artist,
|
||||||
external_link,
|
external_link,
|
||||||
}),
|
}),
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
@ -152,6 +153,7 @@ const loop = async () => {
|
||||||
const scrobbleResult = await scrobble({
|
const scrobbleResult = await scrobble({
|
||||||
// artist: 'Peertube',
|
// artist: 'Peertube',
|
||||||
title: 'Streaming on PeerTube',
|
title: 'Streaming on PeerTube',
|
||||||
|
artist: 'Peertube',
|
||||||
external_link: `https://tube.ebin.club/w/${videoId}`,
|
external_link: `https://tube.ebin.club/w/${videoId}`,
|
||||||
});
|
});
|
||||||
console.info('scrobble: ' + scrobbleResult.status);
|
console.info('scrobble: ' + scrobbleResult.status);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue