storyline.py:剧情简介站点名称前增加序号,数字小的优先

This commit is contained in:
lededev
2021-10-22 17:19:33 +08:00
parent 99ae5bf996
commit d3eef993de
2 changed files with 11 additions and 8 deletions

View File

@@ -34,11 +34,14 @@ def getStoryline(number, title, sites: list=None):
else:
storyine_sites += conf.storyline_censored_site().split(',')
r_dup = set()
apply_sites = []
sort_sites = []
for s in storyine_sites:
if s in G_registered_storyline_site and s not in r_dup:
apply_sites.append(s)
r_dup.add(s)
ns = re.sub(r'.*?:', '', s, re.A)
if ns in G_registered_storyline_site and ns not in r_dup:
sort_sites.append(s)
r_dup.add(ns)
sort_sites.sort()
apply_sites = [re.sub(r'.*?:', '', s, re.A) for s in sort_sites]
mp_args = ((site, number, title, debug) for site in apply_sites)
cores = min(len(apply_sites), os.cpu_count())
if cores == 0: