6.1. get_mov_tor

This executable finds either Magnet links or torrent files of movies. By default it either prints out the chosen magnet link, or downloads the torrent file into the directory to which this tool has executed. This executable uses, among other torrent searches, the Jackett server to search for movies, and may optionally upload the Magnet links or torrent files to the specified Deluge server (see Section 2.2).

The help output, when running get_mov_tor -h, produces the following.

usage: get_mov_tor [-h] -n NAME [-y YEAR] [-M MAXNUM] [-f FILENAME] [--bypass] [-L {DEBUG,INFO,ERROR,NONE}] [-a] [--noverify] [-r]

options:
  -h, --help            show this help message and exit
  -n NAME, --name NAME  Name of the movie to get.
  -y YEAR, --year YEAR  Year to look for the movie to get.
  -M MAXNUM, --maxnum MAXNUM
                        Maximum number of torrents to look through. Default is 10.
  -f FILENAME, --filename FILENAME
                        If defined, put torrent or magnet file into filename.
  --bypass              If chosen, bypass YTS.
  -L {DEBUG,INFO,ERROR,NONE}, --level {DEBUG,INFO,ERROR,NONE}
                        Choose logging level. By default it is NONE. Choices are: [ DEBUG, INFO, ERROR, NONE ].
  -a, --add             If chosen, push the magnet link or torrent file into the deluge server.
  --noverify            If chosen, do not verify SSL connections.
  -r, --raw             If chosen, do not use IMDB matching for Jackett torrents.

There are 10 flags or command line settings, so it is useful to split the different functionalities into separate sections. This tool can operate in three ways: choose a torrent file; or choose a Magnet link (similar to what is done in get_tv_tor). Section 6.1.1 demonstrates the default mode of operation for this tool. Section 6.1.2 describe those settings to get_mov_tor that are shared by all operations. Finally, Section 6.1.3 describes how to change the search for torrent files.

6.1.1. Demonstration of Default Operation

The only required argument is -n or --name, which specifies which movie to search. It is the only argument that is required.By default, this tool uses the IMDb information on a movie to search for the movie torrent. It also first searches for torrent files using the YTS API: if it finds a selection of torrent files, then it stops there, asks for user input, and creates a torrent file in the current working directory; if the torrent file search does not work, then it searches for Magnet links using Jackett and Zooqle, asks for user input, and prints out the full Magnet link in the user shell. Here are two examples of default operation,

  • When get_mov_tor is able to find torrent files, here looking for Star Trek Beyond. Here, there is only a single choice, and a single torrent file, Star_Trek_Beyond.torrent, is created in the current working directory

    tanim-desktop $ get_mov_tor -n "Star Trek Beyond"
    Chosen movie Star Trek Beyond
    

    If there were several choices, such as searching for "Star Trek", then we would choose the number of the torrent file corresponding to Star Trek IV (choice 6), and its torrent file, Star_Trek_IV:_The_Voyage_Home.torrent, is created in the current working directory.

    tanim-desktop $ get_mov_tor -n "Star Trek"
    choose movie: 1: Star Trek
    2: Star Trek Beyond
    3: Star Trek Generations
    4: Star Trek II: The Wrath of Khan
    5: Star Trek III: The Search for Spock
    6: Star Trek IV: The Voyage Home
    7: Star Trek Into Darkness
    8: Star Trek V: The Final Frontier
    9: Star Trek VI: The Undiscovered Country
    10: Star Trek: First Contact
    11: Star Trek: Insurrection
    12: Star Trek: Nemesis
    13: Star Trek: The Motion Picture
    6
    Chosen movie Star Trek IV: The Voyage Home
    
  • In default operation, if we choose a more obscure movie for which a torrent file cannot be found, we get a selection of Magnet links. For example, here we search for the more obscure Michael Moore documentary, Slacker Uprising.

    tanim-desktop $ get_mov_tor -n "Slacker Uprising"
    Choose movie:
    1: Восстание бездельников / Slacker Uprising (Майкл Мур / Michael Moore) [2008, США, Документальный, WEB-DL 1080p] VO + Sub Rus + Original Eng () (1 SE, 2 LE)
    2: Slacker Uprising 2007.1080p WEB-DL AAC2.0 H264-TrollHD [PublicHD] (3.666 GB) (1 SE, 0 LE)
    2
    magnet link: magnet:?xt=urn:btih:08dcd040e04ae3a0aebf7da22f03e9050ec52edc&dn=Slacker+Uprising+2007.1080p+WEB-DL+AAC2.0+H264-TrollHD+[PublicHD]&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.pomf.se%3A80%2Fannounce&tr=udp%3A%2F%2Ftorrent.gresille.org%3A80%2Fannounce&tr=udp%3A%2F%2F11.rarbg.com%2Fannounce&tr=udp%3A%2F%2F11.rarbg.com%3A80%2Fannounce&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=http%3A%2F%2Ftracker.ex.ua%3A80%2Fannounce&tr=http%3A%2F%2Ftracker.ex.ua%2Fannounce&tr=http%3A%2F%2Fbt.careland.com.cn%3A6969%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce
    
  • Finally, if you do not like any of the choices, and if there is more than one choice, you can type in q or other non-numeric character to exit.

    tanim-desktop $ get_mov_tor -n "Slacker Uprising"
    Choose movie:
    1: Восстание бездельников / Slacker Uprising (Майкл Мур / Michael Moore) [2008, США, Документальный, WEB-DL 1080p] VO + Sub Rus + Original Eng () (1 SE, 2 LE)
    2: Slacker Uprising 2007.1080p WEB-DL AAC2.0 H264-TrollHD [PublicHD] (3.666 GB) (1 SE, 0 LE)
    q
    Error, did not give a valid integer value. Exiting...
    

    Note

    this is a bug, I should try to allow the user to stop their choice even if only one Magnet link or torrent file is found.

6.1.2. Common Flags and Settings

Separate from whether or not a torrent file or Magnet link is downloaded, or on which torrent trackers will be searched, are the choices and modifications of the movie on which to search.

  • -y or --year is optionally the YEAR on which to search for the torrent. Setting this can better specify the movie, and may be useful when searching for more obscure movies.

  • --maxnum is the maximum number of magnet links or torrent files to return. The default is 10, but it must be \(\ge 5\).

  • -L or --level sets the logging level. By default it is NONE, but can also be one of DEBUG, INFO, or ERROR.

  • --noverify says to not verify SSL connections.

  • -r or --raw says to only use the search string in -n or --name to search for Magnet links. If a collection of torrent files are found, then this flag is ignored.

These two flags change what happens to the magnet link or torrent file.

  • -f or --filename means to put the Magnet link into a file specified by --filename. However, this argument is ignored if the tool finds a collection of torrent files; the name is fixed by the torrent file choice name (see Section 6.1.1 for examples).

  • --add adds the Magnet URI to the Deluge server. The operation of howdy_deluge_console is described in Section 4.1.3.

If --f is used, then the --add flag cannot be set. Consequently, if the --add flag is set, then --f cannot be used.