d8ahazard / Cast.bundle

A Plex Channel To Interact With Local Cast Devices, Via Plex Media Server
59 stars 11 forks source link

API calls to Plex fail when ssl is turned on in plex #23

Closed brilthor closed 5 years ago

brilthor commented 5 years ago

https://github.com/d8ahazard/Cast.bundle/blob/0b8d89c6c5c1a7c9e1cbd8c014f8e5392dfcd63f/Contents/Code/__init__.py#L638

this breaks when forced ssl is turned on in plex

2018-11-25 19:41:28,796 (7fb191c7a700) :  DEBUG (networking:166) - Requesting 'http://10.246.15.143:32400/clients?X-Plex-Token=<redacted>'
2018-11-25 19:41:28,798 (7fb191c7a700) :  CRITICAL (runtime:889) - Exception (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request
    result = f(**d)
  File "/config/Library/Application Support/Plex Media Server/Plug-ins/Cast.bundle/Contents/Code/__init__.py", line 204, in Resources
    casts = fetch_devices()
  File "/config/Library/Application Support/Plex Media Server/Plug-ins/Cast.bundle/Contents/Code/__init__.py", line 646, in fetch_devices
    req.load()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 181, in load
    f = self._opener.open(req, timeout=self._timeout)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 438, in open
    response = self._open(req, data)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 456, in _open
    '_open', req)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 416, in _call_chain
    result = func(*args)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 1217, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 1190, in do_open
    r = h.getresponse()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/httplib_new.py", line 1030, in getresponse
    response.begin()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/httplib_new.py", line 431, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-ecd600442/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/httplib_new.py", line 395, in _read_status
    raise BadStatusLine(line)
BadStatusLine
d8ahazard commented 5 years ago

Please check out https://github.com/FlexTV.bundle for the latest iteration of the plugin.

Also, there's an experimental stand-alone app for homes without a PMS server, but you want to control cast devices at https://github.com/d8ahazard/FlexConnect - and docker - https://github.com/d8ahazard/docker-FlexConnect

If you have issues, feel free to report them there!