Skip to content

Commit 0df73f5

Browse files
authored
Add Missing timeout (#1489)
* Add Missing timeout _timeout is expected on PlexClient * Update sonos.py Add keyword arguments
1 parent 2ed7702 commit 0df73f5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plexapi/sonos.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import requests
33

4-
from plexapi import CONFIG, X_PLEX_IDENTIFIER
4+
from plexapi import CONFIG, X_PLEX_IDENTIFIER, TIMEOUT
55
from plexapi.client import PlexClient
66
from plexapi.exceptions import BadRequest
77
from plexapi.playqueue import PlayQueue
@@ -46,7 +46,7 @@ class PlexSonosClient(PlexClient):
4646
_session (obj): Requests session object used to access this client.
4747
"""
4848

49-
def __init__(self, account, data):
49+
def __init__(self, account, data, timeout=None):
5050
self._data = data
5151
self.deviceClass = data.attrib.get("deviceClass")
5252
self.machineIdentifier = data.attrib.get("machineIdentifier")
@@ -66,6 +66,7 @@ def __init__(self, account, data):
6666
self._last_call = 0
6767
self._proxyThroughServer = False
6868
self._showSecrets = CONFIG.get("log.show_secrets", "").lower() == "true"
69+
self._timeout = timeout or TIMEOUT
6970

7071
def playMedia(self, media, offset=0, **params):
7172

0 commit comments

Comments
 (0)