3 Commity

5 zmienionych plików z 30 dodań i 5 usunięć
  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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

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

+ 1
- 0
torrentgroupdescription.txt Wyświetl plik

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

+ 27
- 3
upload.py Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz