10
core.py
10
core.py
@@ -240,6 +240,7 @@ def create_folder(success_folder, location_rule, json_data, conf: config.Config)
|
|||||||
path = success_folder + '/' + location_rule.replace("'actor'", "'manypeople'", 3).replace("actor","'manypeople'",3) # path为影片+元数据所在目录
|
path = success_folder + '/' + location_rule.replace("'actor'", "'manypeople'", 3).replace("actor","'manypeople'",3) # path为影片+元数据所在目录
|
||||||
else:
|
else:
|
||||||
path = success_folder + '/' + location_rule
|
path = success_folder + '/' + location_rule
|
||||||
|
path = trimblank(path)
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
path = escape_path(path, conf.escape_literals())
|
path = escape_path(path, conf.escape_literals())
|
||||||
try:
|
try:
|
||||||
@@ -252,6 +253,15 @@ def create_folder(success_folder, location_rule, json_data, conf: config.Config)
|
|||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
|
def trimblank(s: str):
|
||||||
|
"""
|
||||||
|
Clear the blank on the right side of the folder name
|
||||||
|
"""
|
||||||
|
if s[-1] == " ":
|
||||||
|
return trimblank(s[:-1])
|
||||||
|
else:
|
||||||
|
return s
|
||||||
|
|
||||||
# =====================资源下载部分===========================
|
# =====================资源下载部分===========================
|
||||||
|
|
||||||
# path = examle:photo , video.in the Project Folder!
|
# path = examle:photo , video.in the Project Folder!
|
||||||
|
|||||||
Reference in New Issue
Block a user