Browse Source

Handling non-standard plex port case

Kirk Trombley 5 years ago
parent
commit
8025f72bf8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/plugins/plex.py

+ 2 - 1
src/plugins/plex.py

@@ -5,13 +5,14 @@ from rollbot import as_plugin
 from config import get_secret
 
 PLEX_HOST = get_secret("plex.host")
+PLEX_PORT = get_secret("plex.port")
 
 @as_plugin
 def plex():
     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     s.settimeout(5)
     try:
-        s.connect((PLEX_HOST, 32400))
+        s.connect((PLEX_HOST, PLEX_PORT))
         s.shutdown(socket.SHUT_WR)
     except (ConnectionRefusedError, socket.timeout):
         return "I couldn't reach plex within 5 seconds!"