#1 torrentdescriptiontest

Fusionado
sharky555 fusionados 2 commits de torrentdescriptiontest en master hace 2 años
  1. +0
    -1
      copycommand.txt
  2. +1
    -1
      copycommand.txt.example
  3. +1
    -0
      torrentdescription.txt
  4. +1
    -0
      torrentgroupdescription.txt
  5. +27
    -3
      upload.py

+ 0
- 1
copycommand.txt Ver fichero

@@ -1 +0,0 @@
python upload.py -i "C:\file.ts" --releasetype "PV" --artist "" --title "" --tags "pop" --year "2022" --mediasource "HDTV" --imagepath "C:\file.ts_thumbs_[2022.04.29_19.06.07].jpg" --torrentgroupdescription "a long description!!!!" --torrentdescription "placeholder"

+ 1
- 1
copycommand.txt.example Ver fichero

@@ -1,2 +1,2 @@
python upload.py -i "C:\path to file" --releasetype "PV" --artist "" --title "" --tags "" --year "" --mediasource "" --imagepath "C:\path to image" --torrentgroupdescription "a long description!!!!" --torrentdescription "placeholder"
python upload.py -i "C:\path to file" --releasetype "PV" --artist "" --title "" --tags "" --year "" --mediasource "" --imagepath "C:\path to image" --torrentgroupdescription "torrentgroupdescription.txt" --torrentdescription "torrentdescription.txt"

+ 1
- 0
torrentdescription.txt Ver fichero

@@ -0,0 +1 @@
enter your torrent description here

+ 1
- 0
torrentgroupdescription.txt Ver fichero

@@ -0,0 +1 @@
enter your torrent group description here

+ 27
- 3
upload.py Ver fichero

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


Cargando…
Cancelar
Guardar