Пример #1
0
                  path_fanart)
         print('    >fanart.jpg复制成功')
         copyfile(path_poster.replace(str_cd, '-cd1'),
                  path_poster)
         print('    >poster.jpg复制成功')
     except FileNotFoundError:
         pass
 # kodi或者emby需要的第一份图片
 if check_pic(path_fanart):
     # print('    >已有fanart.jpg')
     pass
 else:
     # 下载封面
     print('    >从javbus下载封面:', url_cover)
     try:
         download_pic(url_cover, path_fanart, proxy_bus)
         print('    >fanart.jpg下载成功')
     except:
         num_fail += 1
         record_fail('    >第' + str(num_fail) +
                     '个失败!下载fanart.jpg失败:' + url_cover +
                     ',' + path_relative + '\n')
         continue  # 退出对该jav的整理
 # 裁剪生成 poster
 if check_pic(path_poster):
     # print('    >已有poster.jpg')
     pass
 elif bool_face:
     crop_poster_baidu(path_fanart, path_poster, client)
     # 需要加上条纹
     if bool_watermark_subt and bool_subt:
Пример #2
0
     try:
         copyfile(path_fanart.replace(str_cd, '-cd1'), path_fanart)
         print('    >fanart.jpg复制成功')
         copyfile(path_poster.replace(str_cd, '-cd1'), path_poster)
         print('    >poster.jpg复制成功')
     except FileNotFoundError:
         pass
 # kodi或者emby需要的第一份图片
 if check_pic(path_fanart):
     # print('    >已有fanart.jpg')
     pass
 else:
     # 下载封面
     print('    >从jav321下载封面:', url_cover)
     try:
         download_pic(url_cover, path_fanart, proxy_321)
         print('    >fanart.jpg下载成功')
     except:
         num_fail += 1
         record_fail('    >第' + str(num_fail) + '个失败!下载fanart.jpg失败:' + url_cover + ',' + path_relative + '\n')
         continue  # 退出对该jav的整理
 # 下载海报
 if check_pic(path_poster):
     # print('    >已有poster.jpg')
     pass
 elif url_cover == url_poster:    # 有些素人片,没有fanart和poster之分,只有一张接近正方形的图片
     # 裁剪生成 poster
     crop_poster_default(path_fanart, path_poster, 2)
     # 需要加上条纹
     if bool_watermark_subt and bool_subt:
         add_watermark_subt(path_poster)