浏览代码

added ability to add multiple main artists and changed torrent file creation

master
sharky555 4 年前
父节点
当前提交
5d3c22cd04
共有 2 个文件被更改,包括 13 次插入6 次删除
  1. +7
    -5
      autoupload.py
  2. +6
    -1
      json_data/dictionary.json

+ 7
- 5
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


+ 6
- 1
json_data/dictionary.json 查看文件

@@ -226,6 +226,11 @@
"森内寛樹": null,
"TK from 凛として時雨": null,
"スダンナユズユリー": null,
"ヤなことそっとミュート": null
"ヤなことそっとミュート": null,
"宇徳敬子": null,
"Heavenstamp & ハハノシキュウ": null,
"비": null,
"ぼっちぼろまる": null,
"さなり": null
}
}

正在加载...
取消
保存