subtitle_file = '' # 将该jav的各种属性打包好,包括原文件名带扩展名、所在文件夹路径、第几集、所属字幕文件名 jav_struct = JavFile(file_raw, root, car, dict_car_pref[car], subtitle_file, num_current) list_jav_struct.append(jav_struct) else: print('>>无法处理:', root.replace(root_choose, '') + sep + file_raw) # 判定影片所在文件夹是否是独立文件夹,独立文件夹是指该文件夹仅用来存放该影片,而不是大杂烩文件夹 # 这一层文件夹下有jav if dict_car_pref: # 当前文件夹下,车牌不止一个;还有其他非jav视频;有其他文件夹,除了演员头像文件夹“.actors”和额外剧照文件夹“extrafanart”; if len(dict_car_pref) > 1 or num_videos_include > len( list_jav_struct) or judge_exist_extra_folders(dirs): bool_separate_folder = False # 不是独立的文件夹 else: bool_separate_folder = True # 这一层文件夹是这部jav的独立文件夹 else: continue # 开始处理每一部jav for jav in list_jav_struct: # 告诉用户进度 print('>> [' + str(jav.number) + '/' + str(num_all_videos) + ']:', jav.name) print(' >发现车牌:', jav.car) # 判断是否有中字的特征,条件有三满足其一即可:1有外挂字幕 2文件名中含有“-C”之类的字眼 3旧的nfo中已经记录了它的中字特征 if jav.subtitle:
if car in dict_subtitle_files.values(): subtitle_file = list(dict_subtitle_files.keys())[list(dict_subtitle_files.values()).index(car)] del dict_subtitle_files[subtitle_file] else: subtitle_file = '' # 将该jav的各种属性打包好,包括原文件名带扩展名、所在文件夹路径、第几集、所属字幕文件名 jav_struct = JavFile(file_raw, root, car, dict_car_pref[car], subtitle_file, num_current) list_jav_struct.append(jav_struct) else: print('>>无法处理:', root.replace(root_choose, '') + sep + file_raw) # 判定影片所在文件夹是否是独立文件夹,独立文件夹是指该文件夹仅用来存放该影片,而不是大杂烩文件夹 # 这一层文件夹下有jav if dict_car_pref: # 当前文件夹下,车牌不止一个;还有其他非jav视频;有其他文件夹,除了演员头像文件夹“.actors”和额外剧照文件夹“extrafanart”; if len(dict_car_pref) > 1 or num_videos_include > len(list_jav_struct) or judge_exist_extra_folders(dirs): bool_separate_folder = False # 不是独立的文件夹 else: bool_separate_folder = True # 这一层文件夹是这部jav的独立文件夹 else: continue # 开始处理每一部jav for jav in list_jav_struct: # 告诉用户进度 print('>> [' + str(jav.number) + '/' + str(num_all_videos) + ']:', jav.name) print(' >发现车牌:', jav.car) # 判断是否有中字的特征,条件有三满足其一即可:1有外挂字幕 2文件名中含有“-C”之类的字眼 3旧的nfo中已经记录了它的中字特征 if jav.subtitle: bool_subtitle = True # 判定成功