This program will listen to Web Scrobbler events and automatically update your slack status with what you are listening to.
- Download Web Scrobbler browser extension
- Optional but highly recommended: Create a last.fm account for accurate song play counts, and link it to Web Scrobbler in its settings.
- Create a slack app here with the following manifest:
App Manifest
{"display_information":{"name":"Web Scrobbler Slack Status"},"oauth_config":{"redirect_urls":["https://localhost:7188/auth"],"scopes":{"user":["users.profile:write"]}},"settings":{"org_deploy_enabled":false,"socket_mode_enabled":false,"token_rotation_enabled":false}}
- Go to "Basic Information" in the Slack app you just made and fill in the following in
config.example.json
client_id
: Client IDclient_secret
: Client Secret- leave access_token empty
- Rename
config.example.json
toconfig.json
- Download and install npm and nodejs from here
- Run
npx local-ssl-proxy --source 7188 --target 8564
in terminal. - Install Go from here
- Open terminal in this folder and run
go run cmd/scrobble-status/main.go
. - On first launch, you will be taken to slack to authorize the application, please do so.
- Check your terminal to see the URL to link with Web Scrobbler.
Once everything is linked, listen to music in your browser (websites supported by web scrobbler), and it should just work. Keep in mind that you might want to restart your browser to ensure everything is linked properly, but generally it should not be needed.
Note that while you must have this program and web scrobbler running on the same machine, once you have authenticated slack you can move the config to another machine and it will still work.
In config.json, you can change status_format_string
to specify format of the status. There is no pluralization, and string must be in the format of artist first, then track, then playcount. If you need something more customized, please edit internal/webscrobbler/event.go
.