|
|
@@ -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)
|
|
|
|
|
|
|
|