cleanup
This commit is contained in:
parent
be99df9a89
commit
a7b58352a6
1 changed files with 3 additions and 5 deletions
8
index.js
8
index.js
|
|
@ -9,7 +9,6 @@ const videoId = process.env.VIDEO_ID;
|
||||||
const botBearer = fs.readFileSync(botBearerFile, 'utf-8');
|
const botBearer = fs.readFileSync(botBearerFile, 'utf-8');
|
||||||
const userBearer = fs.readFileSync(userBearerFile, 'utf-8');
|
const userBearer = fs.readFileSync(userBearerFile, 'utf-8');
|
||||||
|
|
||||||
console.log('"' + botBearer + '"')
|
|
||||||
const globalState = {
|
const globalState = {
|
||||||
exit: false,
|
exit: false,
|
||||||
currentlyLive: false,
|
currentlyLive: false,
|
||||||
|
|
@ -82,23 +81,22 @@ const loop = async () => {
|
||||||
if (stateChange) {
|
if (stateChange) {
|
||||||
if (isLive) {
|
if (isLive) {
|
||||||
console.info('Went live!');
|
console.info('Went live!');
|
||||||
console.info(process.env);
|
|
||||||
const postResult = await post({
|
const postResult = await post({
|
||||||
spoiler_text: 'Stream announcment',
|
spoiler_text: 'Stream announcment',
|
||||||
status: [
|
status: [
|
||||||
'hj just went live on peertube',
|
'@hj just went live on peertube',
|
||||||
'',
|
'',
|
||||||
`https://tube.ebin.club/w/${videoId}`,
|
`https://tube.ebin.club/w/${videoId}`,
|
||||||
].join('\n'),
|
].join('\n'),
|
||||||
visibility: 'public',
|
visibility: 'public',
|
||||||
});
|
});
|
||||||
console.info(postResult);
|
console.info('post: ' + postResult.status);
|
||||||
|
|
||||||
const scrobbleResult = await scrobble({
|
const scrobbleResult = await scrobble({
|
||||||
title: 'Streaming on PeerTube',
|
title: 'Streaming on PeerTube',
|
||||||
external_link: `https://tube.ebin.club/w/${videoId}`,
|
external_link: `https://tube.ebin.club/w/${videoId}`,
|
||||||
});
|
});
|
||||||
console.info(scrobbleResult);
|
console.info('scrobble: ' + scrobbleResult.status);
|
||||||
} else {
|
} else {
|
||||||
console.info('Went offline...');
|
console.info('Went offline...');
|
||||||
await scrobble({
|
await scrobble({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue