@@ -287,7 +287,7 @@ def gatherdata():
if originalartist:
releasedata['artistjp'] = originalartist
else:
input_artist = input("\n" + "_" * 100 + "\nEnter the original ARTIST name. Press enter to skip if this torrent has the artist name already e nglish or already has a artist page.\n")
input_artist = input("\n" + "_" * 100 + "\nEnter the original ARTIST name. Press enter to skip if this torrent has the artist name already in E nglish or already has a artist page.\n")
releasedata['artistjp'] = input_artist
if title:
@@ -504,6 +504,25 @@ def localfileorganization(torrent, directory, watch_folder, downloads_folder):
if cfg['local_prefs']['add_to_watch_folder']:
os.rename(torrent, f"{watch_folder}/{torrent}")
def addnewline(text):
text = re.sub(r"\\n", "\n", text)
def gettorrentgroupdescription(textfile):
result = ""
with open(textfile,encoding='utf8') as f:
lines = f.readlines()
for line in lines:
result += line
return result
def gettorrentdescription(textfile):
result = ""
with open(textfile,encoding='utf8') as f:
lines = f.readlines()
for line in lines:
result += line
return result
if __name__ == "__main__":
asciiart()
@@ -514,8 +533,11 @@ if __name__ == "__main__":
originalartist = originaltitle = torrentdescription = torrentgroupdescription = editiontitle = editionyear = year = mediasource = releasetype = None
inputfile = args.input
torrentgroupdescription = args.torrentgroupdescription
torrentdescription = args.torrentdescription
# torrentgroupdescription = args.torrentgroupdescription
# torrentdescription = args.torrentdescription
torrentgroupdescription = gettorrentgroupdescription(args.torrentgroupdescription)
torrentdescription = gettorrentdescription(args.torrentdescription)
if args.dryrun:
dryrun = True
@@ -581,6 +603,8 @@ if __name__ == "__main__":
# Identifying cover.jpg path
# cover_path = directory + "/" + cfg['local_prefs']['cover_name']
#= addnewline(releasedata["album_desc"])
#print(releasedata["album_desc"] )
# Create torrent file.
torrentfile = createtorrent(authkey, inputfile, releasedata)