[4] fix timeout

pull/951/head
meisnate12 2 years ago
parent 588779a6d7
commit 1fc6c5d5c2

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

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

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

@ -409,6 +409,8 @@ class Plex(Library):
logger.secret(self.token) logger.secret(self.token)
try: try:
self.PlexServer = PlexServer(baseurl=self.url, token=self.token, session=self.config.session, timeout=self.timeout) 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: except Unauthorized:
raise Failed("Plex Error: Plex token is invalid") raise Failed("Plex Error: Plex token is invalid")
except ValueError as e: except ValueError as e:

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

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

Loading…
Cancel
Save