Adjust source order for single threading

This commit is contained in:
yoshiko2
2021-05-05 16:23:20 +08:00
parent 07026f89f8
commit 4778e6360e

11
core.py
View File

@@ -70,11 +70,12 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
# if the input file name matches certain rules,
# move some web service to the beginning of the list
if "avsox" in sources and (re.match(r"^\d{5,}", file_number) or
"HEYZO" in file_number or "heyzo" in file_number or "Heyzo" in file_number
):
sources.insert(0, sources.pop(sources.index("avsox")))
elif "mgstage" in sources and (re.match(r"\d+\D+", file_number) or
# if "avsox" in sources and (re.match(r"^\d{5,}", file_number) or
# "HEYZO" in file_number or "heyzo" in file_number or "Heyzo" in file_number
# ):
# sources.insert(0, sources.pop(sources.index("avsox")))
if "mgstage" in sources and (re.match(r"\d+\D+-", file_number) or
"siro" in file_number or "SIRO" in file_number or "Siro" in file_number
):
sources.insert(0, sources.pop(sources.index("mgstage")))