diff --git a/.gitignore b/.gitignore index 8ee6533..370e53d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ __pycache__ +copycommand.txt config.json *session.dat *.torrent \ No newline at end of file diff --git a/README.md b/README.md index edc39c1..1394c87 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,22 @@ Command | Description | Example -f, --freeleech | Enables freeleech (VIP+ Userclass Requirement) | `python autoupload.py -f -dir "Z:\Music\Korean\Ego\Ego - E [2020.01.02] [EP] [WEB-MP3]"` -t, --tags | Add additional tags to upload, separated with comma | `python autoupload.py -t "korean, female.vocalist" -dir "Z:\Music\Korean\Ego\Ego - E [2020.01.02] [EP] [WEB-MP3]"` -dry, --dryrun | Carries out all actions other than the upload itself.| `python autoupload.py -dir "Z:\Music\Korean\Ego\Ego - E [2020.01.02] [EP] [WEB-MP3]" -dry` +-i [INPUT], --input [INPUT] |Initiate upload on input file| +-rt [RELEASETYPE], --releasetype [RELEASETYPE] | Set the release type. (PV, Music Performance, TV Music, TV Variety, TV-Drama) | +-a [ARTIST], --artist [ARTIST] | Set the artist. (Romaji\English). Split multiple with "," | +-oa [ORIGINALARTIST], --originalartist [ORIGINALARTIST] | Set the artist. (Original Language) +-ti [TITLE], --title [TITLE] | Set the title. (Romaji\English) | +-oti [ORIGINALTITLE], --originaltitle [ORIGINALTITLE] | Set the title. (Original Language) | +-t [TAGS], --tags [TAGS]|Add additional tags to the upload. At least 2 tags are required| +-y [YEAR], --year [YEAR]|Set the torrent year (YYYYMMDD or YYYY).| +-fl, --freeleech | Enables freeleech.| +-eti [EDITIONTITLE], --editiontitle [EDITIONTITLE]|Set the edition title| +-ey [EDITIONYEAR], --editionyear [EDITIONYEAR]|Set the torrent edition year (YYYYMMDD or YYYY).| +-ms [MEDIASOURCE], --mediasource [MEDIASOURCE]|Set the media source. (HDTV, Web)| +-im [IMAGEPATH], --imagepath [IMAGEPATH]|Set the torrent cover| +-tdes [TORRENTDESCRIPTION], --torrentdescription [TORRENTDESCRIPTION]|Add a torrent description| +-tgdes [TORRENTGROUPDESCRIPTION], --torrentgroupdescription [TORRENTGROUPDESCRIPTION]|Add a torrent group description. This is a required argument.| +-f [FORMATTYPE], --formattype [FORMATTYPE]|Set the media source. (MPEG, MPEG2, AVI, MKV, MP4, h264)| ## Config.json diff --git a/copycommand.txt b/copycommand.txt index 610b44c..913f68b 100644 --- a/copycommand.txt +++ b/copycommand.txt @@ -1 +1 @@ -python upload.py -i "C:\file.ts" --releasetype "PV" --artist "aimer" --title "test" --tags "pop" --year "2022" --mediasource "HDTV" --imagepath "C:\file.ts_thumbs_[2022.04.29_19.06.07].jpg" --torrentgroupdescription "a long description!!!!" --torrentdescription "placeholder" +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" diff --git a/copycommand.txt.example b/copycommand.txt.example new file mode 100644 index 0000000..7ea1ea1 --- /dev/null +++ b/copycommand.txt.example @@ -0,0 +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" + \ No newline at end of file diff --git a/upload.py b/upload.py index b7be578..d1587a2 100644 --- a/upload.py +++ b/upload.py @@ -600,6 +600,6 @@ if __name__ == "__main__": # if cfg['local_prefs']['add_to_watch_folder'] or cfg['local_prefs']['add_to_downloads_folder']: # localfileorganization(torrent=torrentfile, directory=directory, watch_folder=local_watch_folder, downloads_folder=local_downloads_folder) - if not dryrun: - if cfg['local_prefs']['add_to_watch_folder']: - os.rename(torrentfile, f"{local_watch_folder}/{torrentfile}") + + if cfg['local_prefs']['add_to_watch_folder']: + os.rename(torrentfile, f"{local_watch_folder}/{torrentfile}")