From ab75628cf73875fdbb97daf4a4c02ab263562130 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Wed, 14 Oct 2020 23:48:58 -0700 Subject: [PATCH] Make export threads advanced config setting --- plexpy/config.py | 1 + plexpy/exporter.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/config.py b/plexpy/config.py index a4feeca8..12212255 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -97,6 +97,7 @@ _CONFIG_DEFINITIONS = { 'DO_NOT_OVERRIDE_GIT_BRANCH': (int, 'General', 0), 'ENABLE_HTTPS': (int, 'General', 0), 'EXPORT_DIR': (str, 'General', ''), + 'EXPORT_THREADS': (int, 'Advanced', 8), 'FIRST_RUN_COMPLETE': (int, 'General', 0), 'FREEZE_DB': (int, 'General', 0), 'GET_FILE_SIZES': (int, 'General', 0), diff --git a/plexpy/exporter.py b/plexpy/exporter.py index d8e5c440..b5ab0da3 100644 --- a/plexpy/exporter.py +++ b/plexpy/exporter.py @@ -1660,7 +1660,7 @@ class Export(object): method = getattr(self.obj, self.export_type) items = method() - pool = ThreadPool(processes=4) + pool = ThreadPool(processes=plexpy.CONFIG.EXPORT_THREADS) items = [ExportObject(self, item) for item in items] try: