Coder Social home page Coder Social logo

mdnoyanred / cinema Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arnaudlevaufre/cinema

0.0 0.0 0.0 605 KB

Cinema is a web application which provide a fancy movie library. Wether you run it on your local network or on a public server it gives you access to your movie database from any device by direct download or streaming.

License: MIT License

Python 43.99% CSS 10.20% JavaScript 30.66% HTML 15.14%

cinema's Introduction

Cinema

Cinema is a web application which provide a fancy movie library. Wether you run it on your local network or on a public server it gives you access to your movie database from any device by direct download or streaming.

Features

Current features

  • Automatic informations and poster fetching
  • Automatic movie recognition from filename
  • Direct download
  • Movie managment and edition
  • Movie streaming for .mp4 movies (HTML5 player)
  • Notifications of newly available movies
  • Random movie
  • Search
  • watchlist
  • Subtitle support (.vtt file for django adminstration and .srt file for automatic indexing)

Planned features

  • favorite movies
  • additional movie information (actors, producer ...)
  • ...

Screenshots

Installation

Requirements

You will need python 3.x, pip and ffmpeg.

First clone the project then procede to install the dependencies like so

pip install -r requirements.txt

Configuration

Application

Edit the file cinema/settings.py. The configuration you should change are the following ones

LOGIN_REQUIRED

Setting this to True will ensure only logged user can access the different pages. Setting this to False allows anyone a public access to the movies.

DATABASES

You may want to change the database settings to use mysql or postgresql instead of sqlite. Refer to the django documentation for more informations.

Nginx

If you plan to run this application on a production environment I recommand to use nginx and uwsgi. A uwsgi configuration file is provided. Edit it to suit your needs and then run the uwsgi server like so:

uwsgi uwsgi.ini

Then configure nginx so serve the static files and forward incoming travic to uwsgi. The following configuration can be used as a starting point.

server {
    listen *:80;
    # server_name cinema.example.com;

    root /path/to/project/directory/cinema;
    error_log /var/log/nginx/cinema.log crit;

	location /media {
		autoindex off;
		alias /path/to/project/directory/cinema/media;
	}

	location /static {
		autoindex off;
		alias /path/to/project/directory/cinema/collected_static;
	}

    location / {
		include uwsgi_params;
		uwsgi_pass 127.0.0.1:1234;
    }
}

You will then need to collect static files so run the following command:

./manage.py collectstatic

Running the app

Once you are satisfied with your settings you have to install the database migrations like so:

./manage.py migrate

You should start by adding a movie directory by executing the following command line

./manage.py add /path/to/movie/directory

Or by visiting the django administration site.

Then update the movie database simply run.

./manage.py update

If you often add new movies you should install a cron job which run this command on a regular basis.

Then you can run the django server

./manage.py runserver 127.0.0.1:1234

Visit http://127.0.0.1:1234 and you should have access to your movie database.

cinema's People

Contributors

arnaudlevaufre avatar eijebong avatar stephanepechard 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.