mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-22 12:55:05 +00:00
8ddffb7882
Remove py2 part from _23.py Remove more mapped stuff. Replace filter_iter with native filter. Replace map_iter with native map. Remove unidecode from _23 (empty wrapper on py3). Remove map_list and replace with native list(map( for performance reasons. Replace filter_list with list(filter. Replace list_keys with list(. Replace list_values with list(...values()). Replace list_items with list(....items()). Replace ordered_dict with dict. Fix tvinfo base type docs. Remove py2 parts from sg_futures. Remove scandir lib ... it's a sub module of os in py3. Remove PY2 stuff. Ignore unknown ids for characters/persons. Fix tvdb image parsing. Ignore unknown id sources on person page.
17 lines
482 B
Python
17 lines
482 B
Python
import re
|
|
import threading
|
|
|
|
# noinspection PyProtectedMember,PyUnresolvedReferences
|
|
from concurrent.futures.thread import _WorkItem
|
|
|
|
|
|
class GenericWorkItem(_WorkItem):
|
|
|
|
number_regex = re.compile(r'(_\d+)$')
|
|
|
|
def _set_thread_name(self):
|
|
try:
|
|
ct = threading.current_thread()
|
|
ct.name = '%s^WEB%s' % (self.args[0].__class__.__name__.upper(), self.number_regex.search(ct.name).group(1))
|
|
except (BaseException, Exception):
|
|
pass
|