From 5d3c22cd04b0643927c71d5454c3265d43026629 Mon Sep 17 00:00:00 2001 From: sharky555 Date: Mon, 11 Jan 2021 14:18:27 -0700 Subject: [PATCH] added ability to add multiple main artists and changed torrent file creation --- autoupload.py | 12 +++++++----- json_data/dictionary.json | 7 ++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/autoupload.py b/autoupload.py index e2604e7..983c868 100644 --- a/autoupload.py +++ b/autoupload.py @@ -78,8 +78,9 @@ def createtorrent(authkey, directory, filename, releasedata): ## Format releasedata to bring a suitable torrent name. # The reason we don't just use the directory name is because of an error in POSTING. # POSTS do not seem to POST hangul/jp characters alongside files. - filename = f"{releasedata['idols[]']} - {releasedata['title']} [{releasedata['media']}-{releasedata['audioformat']}].torrent" - #filename = filename.replace("\\","") + # filename = f"{releasedata['idols[]']} - {releasedata['title']} [{releasedata['media']}-{releasedata['audioformat']}].torrent" + filename = f"{releasedata['title']} [{releasedata['media']}-{releasedata['audioformat']}].torrent" + filename = filename.replace("/","") try: t.write(filename) print("_" * 100) @@ -480,9 +481,9 @@ def gatherdata(directory): if releasedata['type'] == "Album": releasedata['type'] = 0 elif releasedata['type'] == "Single": - releasedata['type'] = 1 + releasedata['type'] = 2 else: # EP type - releasedata['type'] = 2 + releasedata['type'] = 1 releasedata['title'] = tags['ALBUM'][0] releasedata['idols[]'] = unique_album_artists @@ -520,9 +521,10 @@ def gatherdata(directory): if debug: print(f"{releasedata['idols[]']} < English = {en}") if en == False: - input_english_artist = input("\n" + "_" * 100 + "\nKorean/Japanese Detected. Please enter the romaji/english artist name:\n") + input_english_artist = input("\n" + "_" * 100 + "\nKorean/Japanese Detected. Seperate multiple main artists with \",\". Please enter the romaji/english artist name:\n") # Create new key called titlejp and assign the old title to it # Replace title with the user input. + input_english_artist = [x.strip() for x in input_english_artist.split(',')] releasedata['idols[]'] = input_english_artist return releasedata diff --git a/json_data/dictionary.json b/json_data/dictionary.json index 776f6e3..a8b5ace 100644 --- a/json_data/dictionary.json +++ b/json_data/dictionary.json @@ -226,6 +226,11 @@ "森内寛樹": null, "TK from 凛として時雨": null, "スダンナユズユリー": null, - "ヤなことそっとミュート": null + "ヤなことそっとミュート": null, + "宇徳敬子": null, + "Heavenstamp & ハハノシキュウ": null, + "비": null, + "ぼっちぼろまる": null, + "さなり": null } } \ No newline at end of file