Skip to content

Commit

Permalink
Merge branch 'LimeDrive:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
TEALC82 authored Jul 17, 2024
2 parents 8e50a68 + 6bb460e commit 4180a8a
Show file tree
Hide file tree
Showing 48 changed files with 1,730 additions and 2,969 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: source/.
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/limedrive/stremio-jackett:develop
ghcr.io/limedrive/stream-fusion:develop
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ This project is intended for educational and research purposes only. Users are r

## Contact

[Contact information to be added]
[![Discord](https://img.shields.io/badge/Discord-Rejoignez%20nous%20sur%20SSD!-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/jcMYfrz3sr)

---

Expand Down
77 changes: 76 additions & 1 deletion deploy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1 +1,76 @@
# TODO:
version: "3.8"

services:

stream-fusion:
image: ghcr.io/limedrive/stream-fusion:develop
container_name: stream-fusion
environment:
SECRET_API_KEY: 'superkey_that_can_be_changed'
TMDB_API_KEY: 'REDATED'
FLARESOLVERR_HOST: flaresolverr
JACKETT_HOST: jackett
JACKETT_API_KEY: 'REDACTED'
ZILEAN_URL: 'http://zilean:8181'
REDIS_HOST: redis
REDIS_PORT: 6379
LOG_LEVEL: DEBUG
LOG_REDACTED: False
TZ: Europe/London
ports:
- 8080:8080
volumes:
- ./stream-fusion:/app/config
depends_on:
- redis
- zilean
- jackett
- flaresolverr
restart: unless-stopped

redis:
image: redis:latest
container_name: redis
expose:
- 6379
volumes:
- ./redis:/data
command: redis-server --appendonly yes
restart: unless-stopped

zilean:
image: ipromknight/zilean:v1.0.17 # Latest version without ElasticSearch
restart: unless-stopped
expose:
- 8181
volumes:
- zilean_data:/app/data

flaresolverr:
image: ghcr.io/flaresolverr/flaresolverr:latest
container_name: flaresolverr
environment:
- LOG_LEVEL=${LOG_LEVEL:-info}
- LOG_HTML=${LOG_HTML:-false}
- CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
- TZ=Europe/London
expose:
- 8191
restart: unless-stopped

jackett:
image: lscr.io/linuxserver/jackett:latest
container_name: jackett
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
volumes:
- ./jackett:/config
- ./blackhole:/downloads
ports:
- 9117:9117
restart: unless-stopped

volumes:
zilean_data:
85 changes: 84 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ sqlalchemy = "^2.0.31"
aiosqlite = "^0.20.0"
toml = "^0.10.2"
jsonpickle = "^3.2.2"
fastapi-simple-rate-limiter = "^0.0.4"
itsdangerous = "^2.2.0"
email-validator = "^2.2.0"
requests-ratelimiter = "^0.7.0"
timeout-decorator = "^0.5.0"
tenacity = "^8.5.0"


[build-system]
Expand Down
16 changes: 14 additions & 2 deletions stream_fusion/constants.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
from typing import Any


NO_CONFIG = {'streams': [{'url': "#", 'title': "No configuration found"}]}
JACKETT_ERROR = {'streams': [{'url': "#", 'title': "An error occured"}]}

# CACHER_URL = "https://stremio-jackett-cacher.elfhosted.com/"

# DMM_API_URL = "http://135.181.110.62:8181"
NO_CACHE_HEADERS = {
"Cache-Control": "no-store, no-cache, must-revalidate, max-age=0",
"Pragma": "no-cache",
"Expires": "0",
}

NO_CACHE_VIDEO_URL = "https://github.com/aymene69/stremio-jackett/raw/main/source/videos/nocache.mp4"

Expand Down Expand Up @@ -83,4 +90,9 @@
'ZOMB', 'ZonaQ', 'Ztracker']

# REDIS_HOST = 'redis'
# REDIS_PORT = 6379
# REDIS_PORT = 6379

class CustomException(Exception):
def __init__(self, status_code: int, message: Any):
self.status_code = status_code
self.message = message
1 change: 1 addition & 0 deletions stream_fusion/gunicorn_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def __init__(self, app: str, host: str, port: int, workers: int, timeout: int, *
"workers": workers,
"worker_class": "stream_fusion.gunicorn_runner.UvicornWorker",
"timeout" : timeout,
"forwarded_allow_ips" : "*",
"logconfig_dict": {
'version': 1,
'disable_existing_loggers': False,
Expand Down
4 changes: 4 additions & 0 deletions stream_fusion/services/fspy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# FlareSolverr Module
from .solver import FlareSolverr

__all__ = ['FlareSolverr']
105 changes: 105 additions & 0 deletions stream_fusion/services/fspy/response_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
from dataclasses import dataclass
from typing import List


@dataclass
class FlareSolverOK:
startTimestamp: int
endTimestamp: int
version: str
status: str
message: str

@classmethod
def from_dict(cls, dct):
return cls(
dct["startTimestamp"],
dct["endTimestamp"],
dct["version"],
dct["status"],
dct["message"]
)


@dataclass
class SessionsListResponse:
startTimestamp: int
endTimestamp: int
version: str
status: str
message: str
sessions: List[str]

@classmethod
def from_dict(cls, dct):
return cls(
dct["startTimestamp"],
dct["endTimestamp"],
dct["version"],
dct["status"],
dct["message"],
dct["sessions"]
)


@dataclass
class SesssionCreateResponse:
startTimestamp: int
endTimestamp: int
version: str
status: str
message: str
session: str

@classmethod
def from_dict(cls, dct):
return cls(
dct["startTimestamp"],
dct["endTimestamp"],
dct["version"],
dct["status"],
dct["message"],
dct["session"]
)


@dataclass
class Solution:
url: str
status: int
cookies: dict
user_agent: str
headers: dict
response: str

@classmethod
def from_dict(cls, dct: dict):
return cls(
dct["url"],
dct["status"],
dct["cookies"],
dct["userAgent"],
dct["headers"],
dct["response"]
)


@dataclass
class GetPostRequestResponse:
startTimestamp: int
endTimestamp: int
version: str
status: str
message: str
solution: Solution

@classmethod
def from_dict(cls, dct: dict):
return cls(
dct["startTimestamp"],
dct["endTimestamp"],
dct["version"],
dct["status"],
dct["message"],
Solution.from_dict(dct["solution"])
)
Loading

0 comments on commit 4180a8a

Please sign in to comment.