Sign inSign up

plexinc/slack-music-notifications

By plexinc

•Updated about 1 year ago

Slack music notifications from plex

Image
2

1M+

plexinc/slack-music-notifications repository overview

⁠Before you begin

⁠1. Find the identifier of the player you want to control.
  • In Plexamp, look for "user": "identifier" in config.json:

    • Mac: ~/Library/Application Support/Plexamp/config.json.
    • Windows: C:\Users\<username>\AppData\Local\Plexamp\Plexamp\config.json.
⁠2. Create a legacy slack token on this page⁠.
⁠3. Make sure you have Webhooks enabled in PMS.
  • Settings → Server → Network (Show Advanced) → ☑️ Webhooks

⁠Running the app

⁠Option 1 — Deploy straight to Heroku

Deploy

⁠Option 2 — Run the app locally

  • Install node.js⁠ version 10 or higher, use of nvm⁠ is recommended.
  • Install yarn⁠.
  • Clone the repository.
  • Install dependencies using yarn.
  • Run the app as follows:
$ yarn start

The app is now running at http://localhost:8000⁠

⁠Option 3 - Run the app in Docker

$ yarn docker:build
$ yarn docker:start

The app is now running at http://localhost:8000⁠

⁠Configure the webhook

In your Plex account settings⁠ add a webhook pointing to where the app is running.

  • If you used the Heroku deployment button the URL would look like https://<my-heroku-app>.herokuapp.com
  • If you are running the app on the same computer as PMS the URL would look like http://localhost:8000

⁠Available parameters

You can provide parameters to the app either via the querystring or environment variables. If both are provided, the querystring value will take precedence.

Query ParameterEnvironment VariableDescription
tokenTOKENYour Slack token⁠. Required for this app to be able to change your status.
usernameUSERNAMEYour Plex username. Required if you are playing music from a shared server, otherwise optional.
playerPLAYERThe client identifier of the player you want to send notifications for. If not provided, your status will update from any Plex client your account is playing music on.
playEmojiPLAY_EMOJIThe Slack emoji to use when playing. Do not include colons, i.e. plexamp-outline. If not provided will clear the emoji in your status.
pauseEmojiPAUSE_EMOJIThe Slack emoji to use when paused. Do not include colons, i.e. plexamp-outline-desaturated. If not provided will clear the emoji in your status.
protectedIf true, your status will be protected from changes if your status emoji is something other than playEmoji or pauseEmoji
⁠Full example
https://my-music-webhooks.herokuapp.com?token={slack_token}&username={plex_username}&player={player_client_identifier}&playEmoji={playing_emoji}&pauseEmoji={paused_emoji}

Tag summary

Content type

Image

Digest

sha256:ec579d989…

Size

68.9 MB

Last updated

about 1 year ago

docker pull plexinc/slack-music-notifications