Преглед изворни кода

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)


Loading…
Откажи
Сачувај