Exemplo n.º 1
0
             jav_struct.episodes = dict_car_pref[
                 jav_num]  # 当前jav,是第几集  {'abp': 1, avop': 2}
             # 这个车牌在dict_subt_files中,有它的字幕。
             if jav_num in dict_subt_files.values():
                 jav_struct.subt = list(dict_subt_files.keys())[list(
                     dict_subt_files.values()).index(jav_num)]
                 del dict_subt_files[jav_struct.subt]
             list_jav_videos.append(jav_struct)
         else:
             print('>>无法处理:' + root.replace(root_choose, '') + sep +
                   file_raw)
             continue  # 【跳出2】
 # 判定影片所在文件夹是否是独立文件夹
 if dict_car_pref:  # 这一层文件夹下有jav
     if len(dict_car_pref) > 1 or num_videos_include > len(
             list_jav_videos) or exist_extra_folders(dirs):
         # 当前文件夹下,车牌不止一个;还有其他非jav视频;有其他文件夹,除了演员头像文件夹“.actors”和额外剧照文件夹“extrafanart”;
         bool_separate_folder = False  # 不是独立的文件夹
     else:
         bool_separate_folder = True  # 这一层文件夹是这部jav的独立文件夹
 else:
     continue  # 【跳出1】
 # 正式开始
 # print(list_jav_videos)
 for jav in list_jav_videos:
     jav_raw_num = jav.num  # 车牌  abc-123
     jav_search = jav_raw_num.replace('-', '%20').replace(
         '_', '%20').replace(' ', '%20')  # 搜素用的车牌  abc%20123
     # print(jav_raw_num, jav_search)
     jav_file = jav.file  # 完整的原文件名  abc-123.mp4
     jav_epi = jav.episodes  # 这是第几集?一般都只有一集
Exemplo n.º 2
0
                 dict_car_pref[jav_num] = 1     # 这个新车牌有了第一集
             # 把这个jav的各种属性打包好
             jav_struct = JavFile()
             jav_struct.num = jav_num           # 车牌
             jav_struct.file = file_raw         # 原文件名
             jav_struct.episodes = dict_car_pref[jav_num]  # 当前jav,是第几集  {'abp': 1, avop': 2}
             # 这个车牌在dict_subt_files中,有它的字幕。
             if jav_num in dict_subt_files.values():
                 jav_struct.subt = list(dict_subt_files.keys())[list(dict_subt_files.values()).index(jav_num)]
                 del dict_subt_files[jav_struct.subt]
             list_jav_videos.append(jav_struct)
         else:
             print('>>无法处理:', root.replace(root_choose, '') + sep + file_raw)
 # 判定影片所在文件夹是否是独立文件夹
 if dict_car_pref:  # 这一层文件夹下有jav
     if len(dict_car_pref) > 1 or num_videos_include > len(list_jav_videos) or exist_extra_folders(dirs):
         # 当前文件夹下,车牌不止一个;还有其他非jav视频;有其他文件夹,除了演员头像文件夹“.actors”和额外剧照文件夹“extrafanart”;
         bool_separate_folder = False   # 不是独立的文件夹
     else:
         bool_separate_folder = True    # 这一层文件夹是这部jav的独立文件夹
 else:
     continue    # 【跳出1】
 # 正式开始
 for jav in list_jav_videos:
     jav_raw_num = jav.num   # 车牌  abc-123
     jav_file = jav.file     # 完整的原文件名  abc-123.mp4
     jav_epi = jav.episodes  # 这是第几集?一般都只有一集
     num_all_episodes = dict_car_pref[jav_raw_num]  # 该车牌总共多少集
     path_jav = root + sep + jav_file    # jav的起始路径
     path_relative = sep + path_jav.replace(root_choose, '')   # 影片的相对于所选文件夹的路径,用于报错
     print('>>正在处理:', jav_file)