This script is intended to be used on a directory containing films. It scans for films, parses some film properties, and checks whether a given film is already on ANT, and whether it's a duplicate or not. A CSV file will be created by the process, containing your film list. The idea is to help find films in your library that could potentially be uploaded.
Currently the script checks if a film is a duplicate based on resolution, codec and source (AKA media). It also checks if the release group (only if extracted successfully) is on the banned list.
Full file path | Parsed film title | Film size (GB) | Resolution | Codec | Source | Release group | Already on ANT? | Info |
---|---|---|---|---|---|---|---|---|
C:\Movies\Another great film (2002) 1080p H264 Blu-ray made_up_release_group.mkv | Another great film | 7.0 | 1080p | H264 | Blu-ray | made_up_release_group | Uploadable - potentially | Film does not exist, or could not match title |
C:\Movies\A great film (2001) 1080p H264 Blu-ray made_up_release_group.mkv | A great film | 10.0 | 1080p | H264 | Blu-ray | made_up_release_group | Uploadable | A film with 1080p/H264/Web does not already exists. link |
C:\Movies\Film with no info.mkv | Film with no info | 0.5 | Duplicate - potentially | On ANT, but could not dupe check (could not extract resolution/codec/media from filename). test_link | ||||
C:\Movies\Batman Begins (2005) 1080p.mkv | Batman Begins | 5.0 | 1080p | Duplicate - partial | A film with 1080p already exists. Could not extract and check codec/media from filename. link | |||
C:\Movies\A made up film (2001) 1080p H264 Blu-ray group_name.mkv | A made up film | 10.0 | 1080p | H264 | Blu-ray | group_name | Duplicate | Exact filename already exists: link |
C:\Movies\25th Hour 2002 1080p BluRay DTS x264-GrapeHD.mkv | 25th Hour | 18.9 | 1080p | H264 | Blu-ray | grapehd | Duplicate | A film with 1080p/H264/Blu-ray already exists: link |
C:\Movies\A.bad.film.2022.720p.WEB-DL.DD5.1.H.264-YIFY.mkv | A bad film | 1.0 | 720p | H264 | Web | yify | Banned | Release group 'yify' is banned from ANT - do not upload |
The process searches through the given directory (or multiple directories), and finds all common video file formats (currently: mp4, avi, mkv, mpeg and m2ts). Using an existing package called guessit and some additional processing, film titles and their properties are parsed. For each film, a get request is sent to ANT's API, to check whether it can be found already. For certain titles, if an initial match is not found, the title is tweaked and re-searched. For example, films containing "and" could be spelt with "and" or "&", so both titles are checked.
The script outputs a csv file containing a list of films it's found and whether they've been found on ANT or not, and whether they are duplicates.
If an existing film_list.csv is found in the output location specified, any films in this that have already been found on ANT and are marked as duplicates (from version 1.7.0) will be skipped by the process. This means you can re-run the script without having to search through your whole film library again. It will not skip films that were not found on ANT or those that were not marked as duplicates (in case they've since been uploaded).
This is a work in progress - please feel free to give helpful feedback and report bugs.
python -m venv .venv
. This should create a folder called .venv containing the virtual environment..venv/Scripts/activate
. If using PowerShell, type .venv/Scripts/Activate.ps1
source .venv/bin/activate
pip install ant-upload-checker
. This should install the package from PyPIant-upload-checker
to run the packageAssuming you've already installed ant_upload_checker, type pip install --upgrade ant-upload-checker
. If there's a new version available, it should update the version you have installed.
Remember that if you originally installed the package into a virtual environment, you will need to first activate the virtual environment again (navigate to the folder, type .venv/Scripts/Activate.ps1
for Windows or source .venv/bin/activate
for Linux)
If you want to do any development work, don't install from PyPi. Instead:
pip install -e .[test]
. This should install the package and the optional test dependencies.See the changelog for recent changes.