Auto hosts talk shows on Twitch to create a radio channel of sorts. https://twitch.tv/hostedradio
This repository has been archived on 2022-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
dependabot[bot] 2198bc8336 chore: bump node-fetch from 2.6.1 to 2.6.7
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 14:33:41 +02:00
.github chore: upgrade deps 2022-01-08 18:36:20 +01:00
data Update ignore-livestate.en.json 2021-11-12 00:35:44 +01:00
lib chore: upgrade deps 2022-01-08 18:36:20 +01:00
schemas chore: upgrade deps 2021-02-07 15:42:57 +01:00
test chore: upgrade deps 2022-01-08 18:36:20 +01:00
.editorconfig chore: switch to gh actions 2021-02-07 15:46:36 +01:00
.eslintrc.json chore: upgrade to twurple modules and convert to es modules 2021-09-06 23:53:39 +02:00
.gitignore Initial commit 2017-08-21 22:29:56 +02:00
app.json chore: run npm in prod mode on heroku 2019-05-15 01:21:50 +02:00
index.js chore: upgrade deps 2022-01-08 18:36:20 +01:00
LICENSE Initial commit 2017-08-21 22:29:56 +02:00
package-lock.json chore: bump node-fetch from 2.6.1 to 2.6.7 2022-08-15 14:33:41 +02:00
package.json chore: bump @twurple/chat from 5.2.0 to 5.2.1 2022-08-15 14:24:33 +02:00
Procfile Many updates, like prefering gamescom footage and making twit a second class citizen 2017-08-22 17:03:46 +02:00
README.md chore: switch to gh actions 2021-02-07 15:46:36 +01:00

radio-hoster

Auto hosts talk shows on Twitch to create a radio channel of sorts.

Currently running on https://twitch.tv/hostedradio

How it works

The service periodically checks for top streams in given categories. It prefers streams in the "Talk Show" category, and then falls back to "Music". Talk show streams are required to be in a certain language, currently configured to English.

the top stream is then hosted as long as it stays live. If it's a rebroadcast (identified by title details like containing "24/7" or by twitch status) or if it is in the ignore-livestate JSON for the current language, it will not stay hosted as long as it's live. Any more popular stream will superseed it.

The stream-schedule JSON for the current language forces some streams to be hosted if they are live in certain time frames. This allows for fixed programming of regular shows.

Configuration

Client configuration is done via environment. The following variables are required:

  • CLIENT_ID: Twitch API Client ID to use
  • TOKEN: Twitch API token. Relies on having an old enough app to get a non-expiring token.
  • USERNAME: Username of the channel to host on

The data folder contains JSON files that are used to help decide what to host when.

Running

Before running the service, you will want to install all dependencies with npm i --production and ensure the environment variables are set. After that you can start it with npm start (assuming the node executable is available as node).

If running with npm start does not work, try running index.js with node.js.

Testing

All the current tests are just JSON schema tests for the JSON files in data.