Skip to content

Commit

Permalink
Core/AddonSettings: Adjust proper defaults for plextv timeouts
Browse files Browse the repository at this point in the history
Core/Networking/MyPlex: Don't use custom certificate for plex.tv connections
  • Loading branch information
pannal committed Sep 13, 2024
1 parent bcddbb9 commit a871bfb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/_included_packages/plexnet/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class HttpRequest(object):
"thread", "__dict__")
_cancel = False

USE_SYSTEM_CERT_BUNDLE = False

def __init__(self, url, method=None):
self.server = None
self.path = None
Expand All @@ -99,7 +101,7 @@ def __init__(self, url, method=None):
self.thread = None

# Use a specific CA cert bundle if applicable
if util.USE_CERT_BUNDLE != "system" and url[:5] == "https":
if not self.USE_SYSTEM_CERT_BUNDLE and util.USE_CERT_BUNDLE != "system" and url[:5] == "https":
if util.USE_CERT_BUNDLE == "custom":
# noinspection PyTypeChecker
self.session.verify = os.path.join(util.translatePath(util.ADDON.getAddonInfo("profile")),
Expand Down
1 change: 1 addition & 0 deletions lib/_included_packages/plexnet/myplexrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@


class MyPlexRequest(plexrequest.PlexServerRequest):
USE_SYSTEM_CERT_BUNDLE = True
def __init__(self, path):
from . import myplexserver
plexrequest.PlexServerRequest.__init__(self, myplexserver.MyPlexServer(), path)
Expand Down
4 changes: 2 additions & 2 deletions lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ class AddonSettings(object):
("skip_intro_button_show_early_threshold1", 70),
("requests_timeout_connect", 5.0),
("requests_timeout_read", 10.0),
("plextv_timeout_connect", 5.0),
("plextv_timeout_read", 20.0),
("plextv_timeout_connect", 1.0),
("plextv_timeout_read", 2.0),
("local_reach_timeout", 10),
("auto_skip_offset", 2.5),
("conn_check_timeout", 2.5),
Expand Down

0 comments on commit a871bfb

Please sign in to comment.