Giter Club home page Giter Club logo

overpass's Introduction

Hi there ๐Ÿ‘‹

Feel free to email me on [email protected] if you would like to chat! ๐Ÿ˜„

overpass's People

Contributors

goats2k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

overpass's Issues

Add unit tests to code base

I wanted to more leave this as a discussion, but I think some unit tests would make your code base much easier to ensure that a change doesn't break everything.

Handle usernames with special characters

Discord usernames can contain pretty much any unicode character, which is a problem for Overpass when it comes to displaying streams.

Problem

Currently, stream URLs look something like this /watch/<username>
This can potentially become a problem if the username looks something like "Example / User", the problems it introduces are:

  • Unless the slashes are escaped by the browser, the stream will simply not work.
  • The URL becomes harder for the user to type, if they just want to watch a user when they're live.

Potential solutions

  • Force every user to create a "display name" and make sure the name only contains letters, numbers and simple symbols.
  • Generate a display name based on their username on the server side.

Refactor database design

  • Use an ORM
  • Refactor database table (user_id instead of user_snowflake in `streams`` for example)
  • Set up some sort of migrations system

Archive: Save filenames only

We should only save filenames to be able to allow for more portability in case the user wants to move the archive elsewhere.

Archive: Pagination

Once the archive gets a bit fuller, we'll need some sort of pagination mechanism.

Internal Server Error after Manual Setup.

Getting this after Discord Auth:

Screenshot_2021-12-18_13-33-48

This is in the terminal:

^Cilfs@ilfsZ:~/overpass$ flask run
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [18/Dec/2021 13:34:25] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [18/Dec/2021 13:34:27] "GET /auth/login/ HTTP/1.1" 302 -
127.0.0.1 - - [18/Dec/2021 13:34:30] "GET /auth/callback?code=fnL7Nt63FT7glFebNGksKvDdk7eMhh&state=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfX3N0YXRlX3NlY3JldF8iOiIycTA1OURKejNhQjFzUkp0Z2pGNm1OeFc1ZFRRb3oifQ.clrqRbaC1UR1UUaX5G6z4V3aNzKKeD0Yzl589Y2OPeg HTTP/1.1" 308 -
Exception on /auth/callback/ [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/ilfs/overpass/overpass/routes/auth.py", line 47, in callback
    discord.callback()
  File "/usr/local/lib/python3.8/dist-packages/flask_discord/client.py", line 157, in callback
    token = self._fetch_token(state)
  File "/usr/local/lib/python3.8/dist-packages/flask_discord/_http.py", line 93, in _fetch_token
    return discord.fetch_token(
  File "/usr/local/lib/python3.8/dist-packages/requests_oauthlib/oauth2_session.py", line 239, in fetch_token
    self._client.parse_request_uri_response(
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/clients/web_application.py", line 203, in parse_request_uri_response
    response = parse_authorization_code_response(uri, state=state)
  File "/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/parameters.py", line 268, in parse_authorization_code_response
    raise MismatchingStateError()
oauthlib.oauth2.rfc6749.errors.MismatchingStateError: (mismatching_state) CSRF Warning! State not equal in request and response.
127.0.0.1 - - [18/Dec/2021 13:34:30] "GET /auth/callback/?code=fnL7Nt63FT7glFebNGksKvDdk7eMhh&state=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfX3N0YXRlX3NlY3JldF8iOiIycTA1OURKejNhQjFzUkp0Z2pGNm1OeFc1ZFRRb3oifQ.clrqRbaC1UR1UUaX5G6z4V3aNzKKeD0Yzl589Y2OPeg HTTP/1.1" 500 -

Here is the .env file

Screenshot_2021-12-18_13-37-59

Any idea how to resolve this.

Admin panel

An admin panel should have the following features:

  • Manage users (list / update / ban)
  • Manage streams from all users (add or remove from the archive)
  • Get user role from discord server if environment variable is set

Write tests

This should've probably been done a long time ago...

HLS: Re-write playlist generator

The current playlist re-writing function is quite inefficient as it runs on every GET /hls/<unique_id>/index.m3u8, instead of updating whenever the last chunk is out of date. This doesn't scale well with many concurrent viewers.

Docker image for linux/amd64?

Hi, I was curious if it'd be possible to get a docker image built for linux/amd64?

I've been interested in running this project for a few days and finally got around to attempting to get it running only to find out Docker images intended for armv7 cannot be ran on amd64 platforms.

I'm not experienced with Docker by any means so maybe im missing something super obvious so im kind of stuck unless I attempt to build manually.

Thanks and I hope to see this project grow.

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.