From ccb139bf5ede95c153ec1d68993398f944d55027 Mon Sep 17 00:00:00 2001 From: LimeDrive Date: Sun, 29 Sep 2024 20:21:30 +0000 Subject: [PATCH 1/3] Refactor: Update file selection logic in RealDebrid class --- stream_fusion/utils/debrid/realdebrid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream_fusion/utils/debrid/realdebrid.py b/stream_fusion/utils/debrid/realdebrid.py index 3b10d00..c6e99f1 100644 --- a/stream_fusion/utils/debrid/realdebrid.py +++ b/stream_fusion/utils/debrid/realdebrid.py @@ -64,7 +64,7 @@ def select_files(self, torrent_id, file_id): self._torrent_rate_limit() url = f"{self.base_url}/rest/1.0/torrents/selectFiles/{torrent_id}" data = {"files": str(file_id)} - self.__session.post(url, headers=self.get_headers(), data=data) + self.json_response(url, method='post', headers=self.get_headers(), data=data) def unrestrict_link(self, link): url = f"{self.base_url}/rest/1.0/unrestrict/link" From 458e87f4a23f1fd55643bb82fec93b0c2a5d8a0a Mon Sep 17 00:00:00 2001 From: LimeDrive Date: Sun, 29 Sep 2024 20:27:45 +0000 Subject: [PATCH 2/3] Refactor: Update file selection logic in RealDebrid class --- stream_fusion/utils/debrid/realdebrid.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stream_fusion/utils/debrid/realdebrid.py b/stream_fusion/utils/debrid/realdebrid.py index c6e99f1..be001cd 100644 --- a/stream_fusion/utils/debrid/realdebrid.py +++ b/stream_fusion/utils/debrid/realdebrid.py @@ -3,6 +3,7 @@ from urllib.parse import unquote from fastapi import HTTPException +import requests from stream_fusion.constants import NO_CACHE_VIDEO_URL from stream_fusion.services.rd_conn.token_manager import RDTokenManager @@ -64,7 +65,8 @@ def select_files(self, torrent_id, file_id): self._torrent_rate_limit() url = f"{self.base_url}/rest/1.0/torrents/selectFiles/{torrent_id}" data = {"files": str(file_id)} - self.json_response(url, method='post', headers=self.get_headers(), data=data) + requests.post(url, headers=self.get_headers(), data=data) + # Do not touch that requests.post, it is not a mistake. The requests.post is used to have the same ip than token owner. def unrestrict_link(self, link): url = f"{self.base_url}/rest/1.0/unrestrict/link" From b234dcbd4fe3228a1fc709dc86c6da07c0dd8b48 Mon Sep 17 00:00:00 2001 From: LimeDrive Date: Sun, 29 Sep 2024 20:32:02 +0000 Subject: [PATCH 3/3] Update version to 2.0.5 in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2f20e05..4ad2108 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "stream-fusion" -version = "2.0.4" +version = "2.0.5" description = "StreamFusion is an advanced plugin for Stremio that significantly enhances its streaming capabilities with debrid service." authors = ["LimeDrive "] readme = "README.md"