Skip to content

CecilioSilva/Plexy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Plexy connects your plex server to your discord server. By sending messages to a certain discord channel when new content is added. And enabling users to look trough and get info about the plex server.


Support


GitHub issues GitHub forks Sponsor Link GitHub stars GitHub license


Features ✨

Plexy is a one of a kind discord bot

  • Easy to use ⚒️
  • Easy to configure ⚙️
  • Customizable 📐
  • Two different modes

How to use Plexy 🤖

Requirements 📜


1. Make your own discord bot

First go to the Discord Developer Portal login with your discord account press new application type the application name and press Create set your application/bot icon and description/about me choose form the navbar in the left Bot option press add bot and yes, do it!

2. make sure you have Python 3.6 or higher installed
3. Download latest release
4. Login to plex with an admin account
5. Unzip the source files and locate configs/secrets.example.json it should look like this:
{
  "bot_token": "<Bot Token>",
  "notificationsChannelId": 1000000000000000000,
  "plexAdminDiscordId": 1000000000000000000,
  "plexBaseUrl": "<Plex Base Url>",
  "plexToken": "<Plex X-Token>",
  "contentUrl": "<Plex Content URL>"
}
  • bot_token → The discord bot token you can find in the Discord developer portal
  • notificationChannelid → Go to discord client Settings > Advanced > Developer Mode and enable it. Then go to the channel you want the new content notifications and right click it and Copy ID
  • plexAdminDiscordId → Do the same as notificationChannelid but select the discord user you that controls the plex server
  • plexBaseUrl → Go to Plex and open the dashboard. goto Settings > Remote Access if plex server is on the same system as the bot use http://localhost:32400/, otherwise use the public ip and port
  • plexToken → See Finding an authentication token / X-Plex-Token
  • contentUrl → Go to the Plex Dashboard and open a media item. then in the address-bar copy everything until /details
    Content-url
6. Rename the file to secrets.json
7. Open configs/config.example.json
  "plex_config": {
    "refreshTime": 15,
    "max-recently-added": 20,
    "scanLibraries": ["TV Shows", "Movies", "Anime"],
    "allLibraries": ["Anime", "Movies", "Home videos", "TV Shows"]
  }
  • scanLibraries → Are all the libraries Plexy searches for new content
  • allLibraries → All the libraries you want plexy to see
"args": {
  "-all": ["Anime", "Movies", "TV Shows"],
  "-movie": ["Movies"],
  "-m": ["Movies"],
  "-show": ["TV Shows"],
  "-s": ["TV Shows"],
  "-anime": ["Anime"],
  "-a": ["Anime"],
  "-h": ["Home videos"],
  "-videos": ["Videos"],
  "-v": ["Videos"]
}

These are all the flags users can use to filter for libraries you can add and remove any flag you want

8. Choose if you want safe mode or not

❗ This is very important
  "general_config" : {
    "safe-mode": true
  }

🛑 Plexy uses the plex token to get media assets from the plex server. But that exposes the plex token you have set to everybody in the discord server/channel. 🛑

9. Rename the file to config.json


Run The Project 🌀

To run the project

  1. (Optional) Make a virtual environment

  2. Install all the dependencies

        pip install -r requirements.txt
    
  3. Run the bot

        python Bot.py
    

Sponsor

Plexy is free and will always be free to use. I did spend a lot of time on creating it.
So any donations are welcome but of course not required. (˵ ͡° ͜ʖ ͡°˵)

Sponsor Link

Future plans

  • I have some plans to document the code better
  • Also planning to change the bot to discord slash commands
  • Find a different way to get media assets without plex token

Issues/Bugs

if you find any issues please create a new issue with logs and details what went wrong.

Contributing

Contributions are always welcome!

License

Copyright 2021 Cecilio Silva Monteiro

Licensed under the GNU General Public License v3.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.gnu.org/licenses/gpl-3.0-standalone.html

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Made by 🧑🏾‍💻

@CecilioSilva

About

Discord bot that connects your plex server to your discord server

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages