Skip to content

Add Missing timeout #1489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading