diff --git a/Pipfile b/Pipfile index a6208fc..06e9d53 100644 --- a/Pipfile +++ b/Pipfile @@ -12,6 +12,7 @@ pydantic = "*" cloudscraper = "*" fastapi = "*" alembic = "*" +gunicorn = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 3a4537c..7f1d3ab 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "e2caac3d94a73cdc1b6139c6a9f462d28934494fcfb653ba41d09fc5bc50858e" + "sha256": "7f02afe7226eb8dad810c24b6cc29ec77ffd071d0e8e08270abe5b0121a15e3c" }, "pipfile-spec": 6, "requires": { @@ -141,6 +141,14 @@ "markers": "python_version >= '3' and platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32')))))", "version": "==1.1.2" }, + "gunicorn": { + "hashes": [ + "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e", + "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8" + ], + "index": "pypi", + "version": "==20.1.0" + }, "idna": { "hashes": [ "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", @@ -343,6 +351,14 @@ ], "version": "==0.9.1" }, + "setuptools": { + "hashes": [ + "sha256:1c664b23706b753986b0f4b13e20bb82177ab29450d5b4d5d6d244c34a2235bd", + "sha256:201d7b596b0685f2dd3aaf231a637ffda51fc61323631d915e5c55b79d2d8115" + ], + "markers": "python_version >= '3.7'", + "version": "==65.1.1" + }, "sniffio": { "hashes": [ "sha256:471b71698eac1c2112a40ce2752bb2f4a4814c22a54a3eed3676bc0f5ca9f663", diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..a14fb7e --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn -w 3 -k uvicorn.workers.UvicornWorker main:app \ No newline at end of file diff --git a/main.py b/main.py index d649591..22c9278 100644 --- a/main.py +++ b/main.py @@ -3,6 +3,7 @@ import json from fastapi import FastAPI, Depends from fastapi.middleware.cors import CORSMiddleware from sqlalchemy.orm import Session +from starlette.staticfiles import StaticFiles import schemas import utils @@ -17,6 +18,7 @@ app.add_middleware( allow_methods=["*"], allow_headers=["*"], ) +app.mount("/static", StaticFiles(directory="resources"), name="static") with open("manifest.json") as file: manifest = json.load(file) diff --git a/manifest.json b/manifest.json index 69d43fb..9ab368d 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { "id": "mhdzumair.addons.tamilblasters", - "version": "1.0.0", + "version": "1.0.1", "name": "Tamil Blasters", - "description" : "TamilBlasters add-on for watch tamil, hindi, malayalam, kannada movies & tamil dubbed movies", - "logo": "https://tamilblasters.cloud/uploads/monthly_2021_06/TBLORG.png.fe46cd789d5ef8c84ab9195a2d7c66b5.png", + "description" : "TamilBlasters add-on for watch tamil, hindi, malayalam, kannada movies & tamil dubbed movies. Created By: Mohamed Zumair", + "logo": "https://streamio-addon-tamilblasters.herokuapp.com/static/tamilblasters.png", "resources": [ "catalog", { diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..ee92de7 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.10.6 \ No newline at end of file diff --git a/schemas.py b/schemas.py index e99141b..5ce0c47 100644 --- a/schemas.py +++ b/schemas.py @@ -26,7 +26,6 @@ class Movie(BaseModel): class Stream(BaseModel): name: str infoHash: str - behaviorHints: dict = {"notWebReady": True} class Streams(BaseModel): diff --git a/utils.py b/utils.py index d7297cc..4effb69 100644 --- a/utils.py +++ b/utils.py @@ -45,10 +45,10 @@ def get_movie_streams(db: Session, video_id: str): return [] stream_data = [] - for name, url in movie_data.video_qualities.items(): + for name, info_hash in movie_data.video_qualities.items(): stream_data.append({ "name": name, - "infoHash": url, + "infoHash": info_hash, }) return stream_data