Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

config.env

ryelogheat edited this page Jul 20, 2021 · 6 revisions
  1. API keys
    • To upload to a tracker you need the following information

      • Tracker API Key
      • Tracker Announce URL (used for generating .torrent)
    • TMDB API Key is required, TMDB is integral to this script. Get API Key

    • Discord Webhooks

      • To get Discord notifications about your uploads you need to create a Server & generate a Webhook URL for one of the channels
      • See the image below for an example of the notifications you would receive
        • discord_notification


  1. Image Hosts
    • These are used for screenshots, currently 4 are supported

      Image Host API Info
      imgbb API Key required
      ptpimg Required (see ptpimg_uploader)
      freeimage API Key required
      imgbox No API Key needed
    • If you intend to use ptpimg you must install the package ptpimg-uploader using pip install ptpimg_uploader

      • ptpimg_uploader isn't included in requirements.txt by default. You'll need to manually pip install it if you want to use it.
    • Set the order that we follow for image uploads (if a host fails or is unreachable we can fallback to the next host specified)

    • For example your order might look something like this (imgbox disabled in this example)

      img_host_1=freeimage
      img_host_2=imgbb
      img_host_3=ptpimg
      img_host_4=
      


  1. Number of screenshots

    • Pretty self explanatory, set this to however many screenshots you want taken & uploaded
    • This will split the duration of the video into this many chunks and take a screenshot at each chunks timestamp
      • num_of_screenshots=6


  2. Selecting media for uploading

    • You can either set a upload_dir_path or use the -path argument
    1. upload_dir_path: set the full path to a folder which contains a single file or folder (e.g. season pack), and it will be uploaded automatically upon script execution
      • upload_dir_path=/home/user/videos/upload_me/
    2. -path argument: If you leave upload_dir_path blank then you have to supply the -path argument followed by the path to the media you want to upload (video file or folder)
      • python3 auto_upload.py -t ABC -path /home/user/videos/upload_me/test.mkv


  1. Post Processing

    • After a successful upload we can move the .torrent file & actual media file/folder to a location you specify
    • Leave blank to disable any movement

    1. dot_torrent_move_location: specify the full path to where you want the .torrent file moved after uploading * this could be used with an AutoWatch directory to automatically start seeding

    2. media_move_location: path to location where you want media file/folder moved to after uploading * again this could be used with AutoTools to automatically start seeding after uploading

    Torrent client & watch directories:

    1. Transmission: open settings.json & append the following lines
      "watch-dir": "/path/to/folder/to/watch/",
      "watch-dir-enabled": true
      
    2. rtorrent/ruTorrent: open rtorrent.rc and add the following line (might already exist)
      schedule = watch_directory,5,5,"load.start=/path/to/folder/to/watch/*.torrent,d.delete_tied="
      
    3. Deluge: TODO
      fill me out later
      


  2. Dupe check

    • Use at your own risk
    • Set check_dupes= to true if you want to use this
      • Using fuzzywuzzy we compare a stripped down version of the title we generate to the results we get from the site search API
      • We remove the title, year, resolution before comparing similarity (we filter out results that don't match the resolution of the local file)
    • Set a maximum similarity percentage (don't include percentage symbol) at acceptable_similarity_percentage=
      • acceptable_similarity_percentage only works if check_dupes=true
      • 100% dupe matches will always cancel the upload no matter what acceptable_similarity_percentage is set to
      • (Higher = Riskier)
    examples of filename & percent differences
     Ex Machina 2015 1080p UHD Bluray DTS 5.1 HDR x265-D-Z0N3
     Ex Machina 2014 1080p UHD BluRay DTS HDR x265 D-Z0N3
     100%
     -----
     Atomic Blonde 2017 1080p UHD Bluray DD+ 7.1 HDR x265-NCmt
     Atomic Blonde 2017 1080p UHD BluRay DD+7.1 HDR x265 - HQMUX
     84%
     -----
     Get Him to the Greek 2010 1080p Bluray DTS-HD MA 5.1 AVC Remux-EPSiLON
     Get Him to the Greek 2010 Unrated BluRay 1080p DTS-HD MA 5.1 AVC REMUX-FraMeSToR
     88%
     -----
     Knives Out 2019 1080p UHD Bluray DD+ 7.1 HDR x265-D-Z0N3
     Knives Out 2019 REPACK 1080p UHD BluRay DDP 7.1 HDR x265-SA89
     89%
    


  3. Auto Mode (silent mode)

    • Set this to true to run without any human interaction
      • This will parse the filename & auto select the right TMDB ID
      • If minor issues are found (e.g. the filename year is off by 1) it will deal with it and upload anyways
      • Note that you are responsible for following all tracker rules and should manually double check all automatic uploads

    • Set this to false to have a more interactive & hands on experience (recommended)
      • If issues are found (e.g. source can't be auto-detected) you'll be prompted for user input that we can use
      • You'll be shown status updates continually & will have a chance to review/approve the final upload data
      • You'll be shown the exact POST data/file payload before its uploaded for your review/approval


  4. auto_mode_force

    • This works in tandem with auto_mode, if auto_mode=false then this won't work
    • If your torrent has minor issues like we can't auto-detect the audio_channels, this will force the upload without that info
      • e.g. If pymediainfo / ffprobe / regex can not detect the audio_codec this will simply omit the audio_codec from the torrent title and finish the upload
    • If missing, these can be skipped:
      • audio_codec audio_channels video_codec (maybe)


  5. Live / Draft

    • This only applies to BHD since they are the only supported site that has a Drafts page
    • It's recommended to set this to False for your first few uploads, so you can verify everything is to your liking
    • Setting this to True will result in BHD uploads being posted live for everyone to see


  6. BDInfo script

    • If you plan on uploading a "Raw Bluray Disc" you need to fill out this option
    • You need to supply it with the path of the BDInfoCLI-ng docker wrapper script
    • Process:
      • Download & install Docker
      • Clone this project BDInfoCLI-ng & cd into it
      • In the folder /BDInfoCLI-ng-UHD_Support_CLI/scripts/ you'll find a file called bdinfo
      • Copy the entire path to that bdinfo file into config.env


  1. Auto re-upload
Clone this wiki locally