From ff5df50bb70ea2b2da34ed0312f54be4cae1b594 Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 17 Oct 2021 11:34:08 +0200 Subject: [PATCH 1/2] Lost patience with Kodi 19: drop use of Python multiprocessing entirely --- resources/lib/entrypoint.py | 8 +++----- resources/lib/utils.py | 31 ------------------------------- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/resources/lib/entrypoint.py b/resources/lib/entrypoint.py index 128c6fef..8e3736db 100644 --- a/resources/lib/entrypoint.py +++ b/resources/lib/entrypoint.py @@ -247,12 +247,10 @@ def show_listing(xml, plex_type=None, section_id=None, synched=True, key=None): widgets.KEY = key # Process all items to show all_items = mass_api(xml) - all_items = utils.process_method_on_list(widgets.generate_item, all_items) - all_items = utils.process_method_on_list(widgets.prepare_listitem, - all_items) + all_items = [widgets.generate_item(api) for api in all_items] + all_items = [widgets.prepare_listitem(item) for item in all_items] # fill that listing... - all_items = utils.process_method_on_list(widgets.create_listitem, - all_items) + all_items = [widgets.create_listitem(item) for item in all_items] xbmcplugin.addDirectoryItems(int(sys.argv[1]), all_items, len(all_items)) # end directory listing xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_UNSORTED) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index d7eea96a..11db93c0 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -21,17 +21,6 @@ import xml.etree.ElementTree as undefused_etree from functools import wraps import re import gc -try: - from multiprocessing.pool import ThreadPool - # Annyoing Kodi bug on Android, introduced with - # https://github.com/xbmc/xbmc/pull/20034 - # See https://github.com/croneter/PlexKodiConnect/issues/1641 - with ThreadPool(): - pass - SUPPORTS_POOL = True -except Exception: - SUPPORTS_POOL = False - import xbmc import xbmcaddon @@ -864,26 +853,6 @@ class XmlKodiSetting(object): return element -def process_method_on_list(method_to_run, items): - """ - helper method that processes a method on each item with pooling if the - system supports it - """ - all_items = [] - if SUPPORTS_POOL: - pool = ThreadPool() - with ThreadPool() as pool: - try: - all_items = pool.map(method_to_run, items) - except Exception: - # catch exception to prevent threadpool running forever - ERROR(notify=True) - else: - all_items = [method_to_run(item) for item in items] - all_items = [_f for _f in all_items if _f] - return all_items - - ############################################################################### # WRAPPERS From 7d37da6177193ae500886687acc45ae59628d25c Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 17 Oct 2021 11:37:43 +0200 Subject: [PATCH 2/2] Stable and beta version bump 3.5.5 --- addon.xml | 7 +++++-- changelog.txt | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/addon.xml b/addon.xml index baf2693c..e108a66f 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + @@ -91,7 +91,10 @@ Plex를 Kodi에 기본 통합 Kodi를 Plex Media Server에 연결합니다. 이 플러그인은 Plex로 모든 비디오를 관리하고 Kodi로는 관리하지 않는다고 가정합니다. Kodi 비디오 및 음악 데이터베이스에 이미 저장된 데이터가 손실 될 수 있습니다 (이 플러그인이 직접 변경하므로). 자신의 책임하에 사용하십시오! 자신의 책임하에 사용 - version 3.5.4: + version 3.5.5: +- Lost patience with Kodi 19: drop use of Python multiprocessing entirely + +version 3.5.4: - Fix Receiving init() missing 1 required positional argument: ‘certification_country’ - Update translations from Transifex diff --git a/changelog.txt b/changelog.txt index 956a19be..01de4e0f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +version 3.5.5: +- Lost patience with Kodi 19: drop use of Python multiprocessing entirely + version 3.5.4: - Fix Receiving init() missing 1 required positional argument: ‘certification_country’ - Update translations from Transifex