Skip to content

Commit

Permalink
Add Missing timeout (#1489)
Browse files Browse the repository at this point in the history
* Add Missing timeout

_timeout is expected on PlexClient

* Update sonos.py

Add keyword arguments
  • Loading branch information
chris-rudmin authored Dec 23, 2024
1 parent 2ed7702 commit 0df73f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plexapi/sonos.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import requests

from plexapi import CONFIG, X_PLEX_IDENTIFIER
from plexapi import CONFIG, X_PLEX_IDENTIFIER, TIMEOUT
from plexapi.client import PlexClient
from plexapi.exceptions import BadRequest
from plexapi.playqueue import PlayQueue
Expand Down Expand Up @@ -46,7 +46,7 @@ class PlexSonosClient(PlexClient):
_session (obj): Requests session object used to access this client.
"""

def __init__(self, account, data):
def __init__(self, account, data, timeout=None):
self._data = data
self.deviceClass = data.attrib.get("deviceClass")
self.machineIdentifier = data.attrib.get("machineIdentifier")
Expand All @@ -66,6 +66,7 @@ def __init__(self, account, data):
self._last_call = 0
self._proxyThroughServer = False
self._showSecrets = CONFIG.get("log.show_secrets", "").lower() == "true"
self._timeout = timeout or TIMEOUT

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

Expand Down

0 comments on commit 0df73f5

Please sign in to comment.