[4] fix timeout

This commit is contained in:
meisnate12 2022-06-30 09:14:09 -04:00
parent 588779a6d7
commit 1fc6c5d5c2
6 changed files with 6 additions and 12 deletions

View file

@ -1 +1 @@
1.17.1-develop3
1.17.1-develop4

View file

@ -183,7 +183,6 @@ class CollectionBuilder:
self.library = library
self.libraries = []
self.playlist = library is None
self.playlist_summary = None
self.overlay = overlay
methods = {m.lower(): m for m in self.data}
if self.playlist:
@ -2438,7 +2437,6 @@ class CollectionBuilder:
if self.playlist:
if summary:
self.playlist_summary = summary
if str(summary[1]) != str(self.obj.summary):
try:
self.obj.edit(summary=str(summary[1]))
@ -2638,13 +2636,6 @@ class CollectionBuilder:
except NotFound:
pass
new_playlist = self.obj.copyToUser(user)
if self.collection_poster:
self.library._upload_image(new_playlist, self.collection_poster)
if self.collection_background:
self.library._upload_image(new_playlist, self.collection_background)
if self.playlist_summary:
new_playlist.edit(summary=self.playlist_summary)
logger.info(f"Playlist: {self.name} synced to {user}")
def send_notifications(self, playlist=False):

View file

@ -240,7 +240,6 @@ class Library(ABC):
self._add_to_file("Filtered", collection, items, is_movie)
def _add_to_file(self, file_type, collection, items, is_movie):
logger.info(items)
if collection not in self.report_data:
self.report_data[collection] = {}
parts = isinstance(items[0], str)

View file

@ -409,6 +409,8 @@ class Plex(Library):
logger.secret(self.token)
try:
self.PlexServer = PlexServer(baseurl=self.url, token=self.token, session=self.config.session, timeout=self.timeout)
plexapi.server.TIMEOUT = self.timeout
os.environ["PLEXAPI_PLEXAPI_TIMEOUT"] = str(self.timeout)
except Unauthorized:
raise Failed("Plex Error: Plex token is invalid")
except ValueError as e:

View file

@ -1226,7 +1226,7 @@ class Overlay:
if self.font_name:
output += f"{self.font_name}{self.font_size}"
if self.back_box:
output += f"{self.back_box[0]}{self.back_box[1]}"
output += f"{self.back_box[0]}{self.back_box[1]}{self.back_align}"
if self.addon_position is not None:
output += f"{self.addon_position}{self.addon_offset}"
for value in [self.font_color, self.back_color, self.back_radius, self.back_padding, self.back_line_color, self.back_line_width]:

View file

@ -5,6 +5,7 @@ from datetime import datetime
try:
import plexapi, requests, schedule
from modules.logs import MyLogger
from plexapi import server
from plexapi.exceptions import NotFound
from plexapi.video import Show, Season
except ModuleNotFoundError:
@ -395,6 +396,7 @@ def run_libraries(config):
try:
logger.add_library_handler(library.mapping_name)
plexapi.server.TIMEOUT = library.timeout
os.environ["PLEXAPI_PLEXAPI_TIMEOUT"] = str(library.timeout)
logger.info("")
logger.separator(f"{library.name} Library")