浏览代码

changed cover image handle to be more robust

sharky-custom
sharky555 2 年前
父节点
当前提交
ea9d82cfbc
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. +5
    -2
      autoupload.py

+ 5
- 2
autoupload.py 查看文件

@@ -741,8 +741,11 @@ if __name__ == "__main__":
# Folder_name equals the last folder in the path, this is used to rename .torrent files to something relevant.
folder_name = os.path.basename(os.path.normpath(directory))
# Identifying cover.jpg path
cover_path = directory + "/" + cfg['local_prefs']['cover_name']
# Identifying cover path
cover_file = [f for f in os.listdir(directory) if (f.lower() in cfg['local_prefs']['cover_templates'])]
cover_path = directory + "\\" + cover_file[0]
if debug:
print(f"Using cover file: {cover_path}")
# Create torrent file.
torrentfile = createtorrent(authkey, directory, folder_name, releasedata)


正在加载...
取消
保存