|
@@ -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!"
|