Merge pull request #232 from 68cdrBxM8YdoJ/fix-location-rule
Change handling location_rule
This commit is contained in:
14
core.py
14
core.py
@@ -2,6 +2,7 @@ import json
|
|||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
|
import platform
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from ADC_function import *
|
from ADC_function import *
|
||||||
@@ -131,11 +132,14 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
|
|||||||
# ====================处理异常字符 END================== #\/:*?"<>|
|
# ====================处理异常字符 END================== #\/:*?"<>|
|
||||||
|
|
||||||
location_rule = eval(conf.location_rule())
|
location_rule = eval(conf.location_rule())
|
||||||
if 'actor' in conf.location_rule() and len(actor) > 100:
|
|
||||||
print(conf.location_rule())
|
# Process only Windows.
|
||||||
location_rule = eval(conf.location_rule().replace("actor","'多人作品'"))
|
if platform.system() == "Windows":
|
||||||
if 'title' in conf.location_rule() and len(title) > 100:
|
if 'actor' in conf.location_rule() and len(actor) > 100:
|
||||||
location_rule = eval(conf.location_rule().replace("title",'number'))
|
print(conf.location_rule())
|
||||||
|
location_rule = eval(conf.location_rule().replace("actor","'多人作品'"))
|
||||||
|
if 'title' in conf.location_rule() and len(title) > 100:
|
||||||
|
location_rule = eval(conf.location_rule().replace("title",'number'))
|
||||||
|
|
||||||
# 返回处理后的json_data
|
# 返回处理后的json_data
|
||||||
json_data['title'] = title
|
json_data['title'] = title
|
||||||
|
|||||||
Reference in New Issue
Block a user