mirror of
https://github.com/nwithan8/plex-prerolls
synced 2024-08-30 16:52:17 +00:00
- Better error message when too many paths (request too large)
This commit is contained in:
parent
07dd14fd64
commit
a370d0f5ae
@ -1,6 +1,7 @@
|
||||
from typing import List, Union, Tuple
|
||||
|
||||
from plexapi.server import PlexServer
|
||||
from plexapi.exceptions import BadRequest
|
||||
|
||||
import modules.logs as logging
|
||||
|
||||
@ -40,6 +41,10 @@ class PlexConnector:
|
||||
|
||||
try:
|
||||
self._plex_server.settings.save() # type: ignore
|
||||
except BadRequest as e:
|
||||
if "Too Large" in str(e):
|
||||
logging.error("Failed to update pre-roll: Too many paths")
|
||||
return
|
||||
except Exception as e:
|
||||
logging.error(f"Failed to save pre-roll: {e}")
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user