Given a directory of poorly formatted movie files, `movie-file-fixer` will create a beautifully formatted library of films folders, complete with posters, subtitles, and IMDb metadata.
Project description
movie-file-fixer
Given a directory of poorly formatted movie files, movie-file-fixer
will create a beautifully formatted directory of films folders, complete with posters, subtitles, and IMDb metadata.
Algorithm
Given a directory string,
-
folderize()
- Prepare the directory space.-
Place all single files (except
contents.json
anderrors.json
) into folders using the file name. - [Folderizer
] -
Pull all subtitle files out of
subs
folders if they exist.
-
-
cleanup()
- Folder cleanup.- Remove non-movie files, based on a list of "bad" extensions (i.e., .nfo, .txt, etc.) - [
FileRemover
]
- Remove non-movie files, based on a list of "bad" extensions (i.e., .nfo, .txt, etc.) - [
-
format()
- Format folders, movie files, and relevant metafiles based on IMDb movie titles.-
Rename the movie file and folder (i.e.,
<movie_title> [<year_of_release>]
) - [Formatter
] -
Create a
contents.json
file to store the metadata, including poster URLs. -
Create an
errors.json
file to contain any files or folders that had issues being formatted.
-
-
get_posters()
- Download the movie poster and name the fileposter.<extension>
(where<extension>
is the original extension of the poster file) - [PosterFinder
] -
get_subtitles()
- Download the subtitles using SubDb (http://thesubdb.com/) and an md5 hash of the movie file and name the file<movie_title> [<year_of_release>].srt
- [SubtitleFinder
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for movie_file_fixer-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f2b207e06264913f34ebb890f6923e16c729dfbe327881d62895e4b20063e6b |
|
MD5 | 5a87edbce278496fbf4c225adfa0dc2f |
|
BLAKE2b-256 | 3e70688b68181627bf0c0e5894484539cffa422b0fe17653cbdae42df0a18f99 |