Merge pull request #367 from Suwmlee/master
Fix file name too long in Linux
This commit is contained in:
16
core.py
16
core.py
@@ -193,15 +193,13 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
|
|||||||
|
|
||||||
location_rule = eval(conf.location_rule())
|
location_rule = eval(conf.location_rule())
|
||||||
|
|
||||||
# Process only Windows.
|
if 'actor' in conf.location_rule() and len(actor) > 100:
|
||||||
if platform.system() == "Windows":
|
print(conf.location_rule())
|
||||||
if 'actor' in conf.location_rule() and len(actor) > 100:
|
location_rule = eval(conf.location_rule().replace("actor","'多人作品'"))
|
||||||
print(conf.location_rule())
|
maxlen = conf.max_title_len()
|
||||||
location_rule = eval(conf.location_rule().replace("actor","'多人作品'"))
|
if 'title' in conf.location_rule() and len(title) > maxlen:
|
||||||
maxlen = conf.max_title_len()
|
shorttitle = title[0:maxlen]
|
||||||
if 'title' in conf.location_rule() and len(title) > maxlen:
|
location_rule = location_rule.replace(title, shorttitle)
|
||||||
shorttitle = title[0:maxlen]
|
|
||||||
location_rule = location_rule.replace(title, shorttitle)
|
|
||||||
|
|
||||||
# 返回处理后的json_data
|
# 返回处理后的json_data
|
||||||
json_data['title'] = title
|
json_data['title'] = title
|
||||||
|
|||||||
Reference in New Issue
Block a user