nalimhahs / pwnit

A personal video streaming service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pwnit

Personal Netflix!

Uses the qbittorrent web api, to handle and manage torrents, which are then uploaded to your telegram account from which we stream the video.

Why go through this much pain? To download via torrent and then upload to telegram and then stream from there? Streaming a torrent is highly unreliable. And telegram offers unlimited storage blocks of 2 gigs with cdns all around the world. This is just a small personal project trying to link the two somehow (Partially successful as of now).

Issues: Right now the upload speeds of my test server is painfully slow, resulting in the main upload celery worker to timeout or hog the main worker thread for too long. Development paused till I find something faster.

Note: Use at your own risk! Using torrent is illegal in some countries. Excessive usage of the telegram api can result in getting your account banned or rate limited. The app does try to protect against some limits but is nowhere near complete. I am not responsible for any issues that may arise from using this app.

Built with Cookiecutter Django Black code style
License:MIT

Settings

Moved to settings.

Basic Commands

Setting Up Your Users

  • To create a normal user account, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.

  • To create an superuser account, use this command:

    $ python manage.py createsuperuser
    

For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.

Type checks

Running type checks with mypy:

$ mypy pwnit

Test coverage

To run the tests, check your test coverage, and generate an HTML coverage report:

$ coverage run -m pytest
$ coverage html
$ open htmlcov/index.html

Running tests with py.test

$ pytest

Live reloading and Sass CSS compilation

Moved to Live reloading and SASS compilation.

Celery

This app comes with Celery.

To run a celery worker:

cd pwnit
celery -A config.celery_app worker -l info

Please note: For Celery's import magic to work, it is important where the celery commands are run. If you are in the same folder with manage.py, you should be right.

Sentry

Sentry is an error logging aggregator service. You can sign up for a free account at https://sentry.io/signup/?code=cookiecutter or download and host it yourself. The system is setup with reasonable defaults, including 404 logging and integration with the WSGI application.

You must set the DSN url in production.

Deployment

The following details how to deploy this application.

Heroku

See detailed cookiecutter-django Heroku documentation.

About

A personal video streaming service

License:MIT License


Languages

Language:Python 79.9%Language:HTML 15.3%Language:Shell 3.5%Language:CSS 0.7%Language:JavaScript 0.7%