From bc125d04940429c8c5afe3ce0f1916cb140afe64 Mon Sep 17 00:00:00 2001 From: LimeDrive Date: Thu, 18 Jul 2024 01:42:10 +0200 Subject: [PATCH 1/2] update tmdb.py and torrent_service.py --- stream_fusion/utils/metdata/tmdb.py | 2 +- stream_fusion/utils/torrent/torrent_service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stream_fusion/utils/metdata/tmdb.py b/stream_fusion/utils/metdata/tmdb.py index 1165dcf..b14bb04 100644 --- a/stream_fusion/utils/metdata/tmdb.py +++ b/stream_fusion/utils/metdata/tmdb.py @@ -32,7 +32,7 @@ def get_metadata(self, id, type): else: result = Series( id=id, - tmdb_id = data["movie_results"][0]["id"], + tmdb_id = data["tv_results"][0]["id"], titles=[self.replace_weird_characters(data["tv_results"][0]["name"])], season="S{:02d}".format(int(full_id[1])), episode="E{:02d}".format(int(full_id[2])), diff --git a/stream_fusion/utils/torrent/torrent_service.py b/stream_fusion/utils/torrent/torrent_service.py index ea13475..0cd7c9b 100644 --- a/stream_fusion/utils/torrent/torrent_service.py +++ b/stream_fusion/utils/torrent/torrent_service.py @@ -92,7 +92,7 @@ def __process_ygg_proxy_url(self, result: TorrentItem): 'api-key': settings.ygg_proxy_apikey } response = self.__session.get(result.link, allow_redirects=False, timeout=20, headers=headers) - time.sleep(0.3) # Add a delay of 0.3 seconds between requests faire usage for small VPS + time.sleep(0.1) # Add a delay of 0.1 seconds between requests faire usage for small VPS except requests.exceptions.RequestException: self.logger.error(f"Error while processing url: {result.link}") return result From e8fcbecd02bfcddf201b74088cf2151062319aa5 Mon Sep 17 00:00:00 2001 From: LimeDrive Date: Fri, 19 Jul 2024 00:14:13 +0200 Subject: [PATCH 2/2] bump beta --- pyproject.toml | 2 +- stream_fusion/settings.py | 2 +- stream_fusion/utils/torrent/torrent_service.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 346109e..99981e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "stream-fusion" -version = "0.2.0" +version = "0.3.0" description = "StreamFusion is an advanced plugin for Stremio that significantly enhances its streaming capabilities with debrid service." authors = ["LimeDrive "] readme = "README.md" diff --git a/stream_fusion/settings.py b/stream_fusion/settings.py index 8f40dd2..633b970 100644 --- a/stream_fusion/settings.py +++ b/stream_fusion/settings.py @@ -22,7 +22,7 @@ class Settings(BaseSettings): port: int = 8080 host: str = "0.0.0.0" gunicorn_timeout: int = 180 - aiohttp_timeout: int = 3600 + aiohttp_timeout: int = 7200 reload: bool = False session_key: str = "331cbfe48117fcba53d09572b10d2fc293d86131dc51be46d8aa9843c2e9f48d" use_https: bool = False diff --git a/stream_fusion/utils/torrent/torrent_service.py b/stream_fusion/utils/torrent/torrent_service.py index 0cd7c9b..0ac8130 100644 --- a/stream_fusion/utils/torrent/torrent_service.py +++ b/stream_fusion/utils/torrent/torrent_service.py @@ -91,7 +91,7 @@ def __process_ygg_proxy_url(self, result: TorrentItem): 'accept': 'application/json', 'api-key': settings.ygg_proxy_apikey } - response = self.__session.get(result.link, allow_redirects=False, timeout=20, headers=headers) + response = self.__session.get(result.link, timeout=20, headers=headers) time.sleep(0.1) # Add a delay of 0.1 seconds between requests faire usage for small VPS except requests.exceptions.RequestException: self.logger.error(f"Error while processing url: {result.link}")