Merge pull request #1666 from croneter/python3-beta
Bump Python 3 master
This commit is contained in:
commit
741ae76cf9
4 changed files with 11 additions and 38 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="3.5.4" provider-name="croneter">
|
||||
<addon id="plugin.video.plexkodiconnect" name="PlexKodiConnect" version="3.5.5" provider-name="croneter">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="3.0.0"/>
|
||||
<import addon="script.module.requests" version="2.22.0+matrix.1" />
|
||||
|
@ -91,7 +91,10 @@
|
|||
<summary lang="ko_KR">Plex를 Kodi에 기본 통합</summary>
|
||||
<description lang="ko_KR">Kodi를 Plex Media Server에 연결합니다. 이 플러그인은 Plex로 모든 비디오를 관리하고 Kodi로는 관리하지 않는다고 가정합니다. Kodi 비디오 및 음악 데이터베이스에 이미 저장된 데이터가 손실 될 수 있습니다 (이 플러그인이 직접 변경하므로). 자신의 책임하에 사용하십시오!</description>
|
||||
<disclaimer lang="ko_KR">자신의 책임하에 사용</disclaimer>
|
||||
<news>version 3.5.4:
|
||||
<news>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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue