Skip to content

Code structure #94

@emilsvennesson

Description

@emilsvennesson

The code in inputstreamhelper.py is starting to become rather complex and it's time we start splitting parts into different files. The new API @dagwieers implemented definietely belongs in its own file, and there are probably other parts that we could split up as well to make everything look a bit cleaner. I have something like this in mind:

  • One file (api.py) for the API stuff.
  • One file (common.py/utils.py) that includes all/most of the class methods and other code we can use across all files (JSON RPC requests, HTTP get functions etc).
  • A folder (widevine) with three files: arm.py, x86.py and widevine.py. widevine.py would obviously include code that works on both platforms, and we could then import arm.py/x86.py depending on which platform the user is on. That way, we'll be able to simplify things and restructure the ugly install_widevine() wrapper method.
  • inputstreamhelper.py includes code related to inputstream.adaptive such as enabling/disabling the add-on, HLS checks etc.

In the future, we could also split up the logging code and make use of the Python logging module. Another issue should be opened to discuss this though! :-)

-- Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions