iNeedSubs / legacy

Download subtitles for movies and shows in your preferred language.
https://subtitles.pw
GNU General Public License v3.0
2 stars 1 forks source link

Subtitles

https://subtitles.spimy.dev

Hosted on my own server with NGINX working as the reverse proxy to the gunicorn socket.

Free SSL/TSL provided by Let's Encrypt using CertBot.

Download subtitles for movies and shows in your preferred language.

Local setup

Prerequisites

Your system should have these installed before you continue with the local setup:

Installation

Ignore step 5 for now even if Django tells you to do so as this could pose errors in the future since we don't currently need or have a database.

  1. Install pipenv: pip install pipenv.
  2. Install python dependencies by running pipenv install, which also creates a virtual env.
  3. Install node dependencies by running yarn.
  4. Create the .env file and fill it in using the variables listed below.
  5. Run pipenv shell to activate a sub shell for the virtual environment created.
  6. Run python manage.py migrate if there are changes made to the database.

Environment Variables

Keep the the SETTING variable as it is.

TMDB_KEY=
SECRET_KEY=
SETTING=subtitles.settings.dev

Running

You can either run the production preview which hosted by Django or run the development server made by Vue with features such as hot reloading which is ideal when developing.

Production preview

  1. Build the frontend with yarn build.
  2. Run pipenv shell to activate the virtual environment.
  3. Run python manage.py runserver to start the server.

Development server

You'd need to run two shell instances here, one for the Vue frontend and one for the Django backend which provides the API endpoints.

  1. Run pipenv shell to activate the virtual environment.
  2. Run python manage.py runserver to start the Django backend.
  3. Run yarn serve to start the Vue frontend.