Skip to content

Commit

Permalink
Test connection with a lightweight call instead of fetching all sections
Browse files Browse the repository at this point in the history
#11, will need confirmation on if this actually fixes anything or not from @phobiac before I can safely close the issue.
  • Loading branch information
JourneyOver committed Jan 11, 2025
1 parent 0a3c50a commit e65cd26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from plex_auto_languages.utils.healthcheck import HealthcheckServer

# Version information
__version__ = "1.3.2-dev2"
__version__ = "1.3.2-dev3"

class PlexAutoLanguages:
"""
Expand Down
4 changes: 2 additions & 2 deletions plex_auto_languages/plex_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def connected(self):
if self._plex is None:
return False
try:
_ = self._plex.library.sections()
_ = self._plex.library.search(libtype="episode", maxresults=1)
return True
except (BadRequest, RequestsConnectionError):
except (BadRequest, RequestsConnectionError, NotFound):
return False

@property
Expand Down

0 comments on commit e65cd26

Please sign in to comment.