Movie Assets Downloader is a Python script designed to automate the downloading of movie posters and backgrounds (backdrops) from the TMDB (The Movie Database) API. The script scans a specified directory for movie folders named in the format MovieName (Year)
, fetches the corresponding movie data from the TMDB API, and saves the movie poster and background images directly into the respective movie folders.
- This script utilizes the Kometa asset_directory: setting and assumes the operations: assets_for_all is set to true
- The operation assets_for_all:true will create a folder in the asset directory for all movies in your library
- The create asset folder for the movie is where the script will download the files to for each movie
- Automated Scanning: Automatically scans a base directory for movie folders and extracts movie names and release years.
- TMDB Integration: Fetches movie data, including poster and background URLs, from the TMDB API.
- Concurrent Downloads: Efficiently downloads multiple images using concurrent requests.
- Error Logging: Logs movies that failed to download their assets into a file for easy troubleshooting.
- Customizable Paths: Allows users to specify the base directory for movies and the output file for logging failed downloads.
- Python 3.x
requests
library
- Clone the repository:
git clone https://github.com/yourusername/MovieAssetsDownloader.git
- Navigate to the project directory:
cd MovieAssetsDownloader
- Install the required dependencies:
pip install -r requirements.txt
- Update the
YOUR_API_KEY_GOES_HERE
placeholder with your TMDB API key in the script. - Set the
base_movie_path
to your movie directory path. - Run the script:
python MovieAssetsDownloader.py
python MovieAssetsDownloader.py
- TMDB API Key: Update the
YOUR_API_KEY_GOES_HERE
placeholder in the script with your TMDB API key. - Base Movie Path: Set the
base_movie_path
variable to the directory containing your movie folders. - Failed Movies File: The script saves a list of movies that failed to download their assets to
failed_movies.txt
in the same directory as the movie folders.
- Support for downloading additional movie assets.
- Improved error handling and logging.
Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss any changes.
This script was inspired by and based on the work of phillyNYC/PostersBulkDownloader.
This project is licensed under the MIT License. See the LICENSE file for details.