Update 2.8.3

This commit is contained in:
yoshiko2
2020-03-24 10:53:58 +08:00
parent 645b30cf38
commit 2ebc74fd8d
4 changed files with 860 additions and 853 deletions

View File

@@ -134,27 +134,27 @@ if __name__ == '__main__':
count = count + 1
percentage = str(count / int(count_all) * 100)[:4] + '%'
print('[!] - ' + percentage + ' [' + str(count) + '/' + count_all + '] -')
# print("[!]Making Data for [" + i + "], the number is [" + getNumber(i) + "]")
# core_main(i, getNumber(i))
# print("[*]======================================================")
try:
print("[!]Making Data for [" + i + "], the number is [" + getNumber(i) + "]")
core_main(i, getNumber(i))
print("[*]======================================================")
except: # 番号提取异常
print('[-]' + i + ' Cannot catch the number :')
if config['common']['soft_link'] == '1':
print('[-]Link', i, 'to failed folder')
os.symlink(i, str(os.getcwd()) + '/' + failed_folder + '/')
else:
try:
print('[-]Move ' + i + ' to failed folder')
shutil.move(i, str(os.getcwd()) + '/' + failed_folder + '/')
except FileExistsError:
print('[!]File exists in failed!')
except:
print('[+]skip')
continue
print("[!]Making Data for [" + i + "], the number is [" + getNumber(i) + "]")
core_main(i, getNumber(i))
print("[*]======================================================")
# try:
# print("[!]Making Data for [" + i + "], the number is [" + getNumber(i) + "]")
# core_main(i, getNumber(i))
# print("[*]======================================================")
# except: # 番号提取异常
# print('[-]' + i + ' Cannot catch the number :')
# if config['common']['soft_link'] == '1':
# print('[-]Link', i, 'to failed folder')
# os.symlink(i, str(os.getcwd()) + '/' + failed_folder + '/')
# else:
# try:
# print('[-]Move ' + i + ' to failed folder')
# shutil.move(i, str(os.getcwd()) + '/' + failed_folder + '/')
# except FileExistsError:
# print('[!]File exists in failed!')
# except:
# print('[+]skip')
# continue
CEF(success_folder)
CEF(failed_folder)

View File

@@ -21,8 +21,8 @@ media_warehouse=emby
#emby or plex or kodi ,emby=jellyfin
[escape]
literals=\()
literals=\()/
folders=failed,JAV_output
[debug_mode]
switch=1
switch=0

View File

@@ -18,6 +18,7 @@ import javbus
import javdb
import fanza
import requests
import random
# =====================本地文件处理===========================
@@ -128,6 +129,11 @@ def getDataFromJSON(file_number, filepath, failed_folder): # 从JSON返回元
naming_rule = eval(config['Name_Rule']['naming_rule'])
location_rule = eval(config['Name_Rule']['location_rule'])
if 'actor' in config['Name_Rule']['location_rule'] and len(actor) > 100:
print(config['Name_Rule']['location_rule'])
location_rule = eval(config['Name_Rule']['location_rule'].replace("actor","'多人作品'"))
if 'title' in config['Name_Rule']['location_rule'] and len(title) > 100:
location_rule = eval(config['Name_Rule']['location_rule'].replace("title",'number'))
# 返回处理后的json_data
json_data['title'] = title
@@ -193,7 +199,7 @@ def smallCoverCheck(path, number, imagecut, cover_small, c_word, option, Config,
def creatFolder(success_folder, location_rule, json_data, Config): # 创建文件夹
title, studio, year, outline, runtime, director, actor_photo, release, number, cover, website = get_info(json_data)
title, studio, year, outline, runtime, director, actor_photo, release, number, cover, website= get_info(json_data)
if len(location_rule) > 240: # 新建成功输出文件夹
path = success_folder + '/' + location_rule.replace("'actor'", "'manypeople'", 3).replace("actor",
"'manypeople'",
@@ -208,6 +214,7 @@ def creatFolder(success_folder, location_rule, json_data, Config): # 创建文
except:
path = success_folder + '/' + location_rule.replace('/[' + number + ']-' + title, "/number")
path = escapePath(path, Config)
os.makedirs(path)
return path

BIN
linux_make Executable file

Binary file not shown.