Coder Social home page Coder Social logo

fotisk / moviecatalog Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 3.0 13.36 MB

A Python Tool that aggregates metadata from multiple sources and generates a user-friendly movie catalogue out of the files in a folder. Ideal for cataloging film collections/media.

License: MIT License

Python 100.00%
movies movie-collection movie-database python-script imdb-movies tmdb movie-catalog movie-catalogue trailer python3

moviecatalog's Introduction

MovieCatalog

What is MovieCatalog?

Movie Catalog is a python script that fetches movie data from various sources (imdb,tmdb,youtube,google) and generates a user-friendly catalog for all the movies the user has inside a folder. I created it to best manage my watchlist and quickly scan for movie information without jumping from site to site. It can work however on things such as movie files, screenshots, subtitle collections, or torrent files, or simple text files as long as the filenames are indicative of a movie.

image1

movie page

The resulting catalog can be found inside the index.html file.

(!) MovieCatalog is NOT a movie downloader.

How does MovieCatalog find which movies to download data for?

MovieCatalog is filesystem-based meaning that it scans a specific folder (Source) for files and folders (eg. .srt files, video files, .torrent files or .txt files) and fetches the information for the movies extracted from the filenames. In other words, it treats the folder's content, as a list of movie names. The downloaded data are kept in a cache folder.

filelist

Features

Runs on demand

MovieCatalog does not run in the background but can be automated to run when a file is added or removed from a folder (eg via smart folders/Automator) - The .py script updates the catalog by scanning changes in the Source folder, fetching the data and rebuilding the monolithic index.html file and then quits.

Is filesystem-based

You need only manage your movie files (Source). The script makes sure that there is parity between the source movie files/folders and the cached data. If a movie exists and its cache doesn't, it fetches the data. If a movie no longer exists, it deletes the orphaned cache silently.

Contains various filters for data sorting/filtering

Supports various sorting options, as well as filtering by media type (movie,tv series) or combined genres (by pressing Cmd/Ctrl)

filtering

MovieCatalog allows full-text searching inside keywords, synopsis, cast and crew data, alternative titles, ratings and things such as the release year etc.

searching

Other features

The MovieCatalog index.html page is responsive, allows switching between light/dark mode easily and links to trailers in order to provide a one-stop experience to the user. It displays the Director of Photography/Cinematographer since I find it quite important. There are links for the movies/shows and the cast/crew members to their respective IMDB and TMDB pages.

Installation

  1. Copy the files main.py,DefaultSettings.py,templates/ and resources/ into a folder
  2. Install Python3, get the dependencies (requirements.txt) and build the environment.
  3. In order to use the script, you need a free account at http://www.themoviedb.org
  1. Find the absolute path of the folder where the movies are,
  • open the file DefaultSettings.py and paste the absolute path inside the quotes of SourcePath='' eg. SourcePath='/Users/User1/MyFiles/Movies/'
  1. Save the file.

Usage

Basic Usage

  • run main.py -s to scan for new/deleted movie files and then rebuild the html file. When importing many files, there may be some random waiting intervals to prevent blacklisting on google.com
  • open index.html in your browser

Changing mismatches

If the movie was matched to the wrong IMDB id, or not matched at all, or incomplete data was fetched:

  • run main.py -l unimported (unimported or all,ambiguous,verified,incomplete) to display the files that were affected.
  • run main.py -c -f <filename> -i <new imdbID> with the filename and the correct IMDB ID(eg.main.py -c -f 'Vertigo.mp4' -i 0052357)

Other usage

  • run main.py to rebuild the index.html without scanning for new/deleted files
  • run main.py -? displays command-line parameters

notes using with pipenv/pip3

pipenv run python3 main.py -s

Limitations/Compatibility

It has been tested on Opera, Firefox and Safari and Python3. Tested with 700 movies. Since there is no actual database on the backend, more files mean slower performance overall

future work

  • get rid of the command-line interface and allow movie-meta editing via the app (django/flask)
  • store data in an SQL database
  • allow import from imdb watchlist
  • allow scanning multiple locations

moviecatalog's People

Contributors

fotisk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.