Skip to content

Commit

Permalink
Fix type error because of wrong amount of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
davidemarcoli committed May 2, 2024
1 parent e093904 commit 533596a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions source/debrid/base_debrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def donwload_torrent_file(self, download_url):

return response.content

def get_stream_link(self, query):
def get_stream_link(self, query, ip=None):
raise NotImplementedError

def add_magnet(self, magnet):
def add_magnet(self, magnet, ip=None):
raise NotImplementedError

def get_availability_bulk(self, hashes_or_magnets, ip=None):
Expand Down
4 changes: 2 additions & 2 deletions source/debrid/premiumize.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, config):
super().__init__(config)
self.base_url = "https://www.premiumize.me/api"

def add_magnet(self, magnet):
def add_magnet(self, magnet, ip=None):
url = f"{self.base_url}/transfer/create?apikey={self.config['debridKey']}"
form = {'src': magnet}
return self.get_json_response(url, method='post', data=form)
Expand Down Expand Up @@ -47,7 +47,7 @@ def get_availability_bulk(self, hashes_or_magnets, ip=None):
hashes_or_magnets)
return self.get_json_response(url)

def get_stream_link(self, query):
def get_stream_link(self, query, ip=None):
query = json.loads(query)
magnet = query['magnet']
logger.info(f"Received query for magnet: {magnet}")
Expand Down
4 changes: 2 additions & 2 deletions source/debrid/realdebrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, config):
self.base_url = "https://api.real-debrid.com"
self.headers = {"Authorization": f"Bearer {self.config['debridKey']}"}

def add_magnet(self, magnet):
def add_magnet(self, magnet, ip=None):
url = f"{self.base_url}/rest/1.0/torrents/addMagnet"
data = {"magnet": magnet}
return self.get_json_response(url, method='post', headers=self.headers, data=data)
Expand Down Expand Up @@ -81,7 +81,7 @@ def get_availability_bulk(self, hashes_or_magnets, ip=None):
url = f"{self.base_url}/rest/1.0/torrents/instantAvailability/{'/'.join(hashes_or_magnets)}"
return self.get_json_response(url, headers=self.headers)

def get_stream_link(self, query_string):
def get_stream_link(self, query_string, ip=None):
query = json.loads(query_string)

magnet = query['magnet']
Expand Down
2 changes: 1 addition & 1 deletion source/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
root_path = "/" + root_path
app = FastAPI(root_path=root_path)

VERSION = "4.1.3"
VERSION = "4.1.4"
isDev = os.getenv("NODE_ENV") == "development"
COMMUNITY_VERSION = True if os.getenv("IS_COMMUNITY_VERSION") == "true" else False

Expand Down
2 changes: 1 addition & 1 deletion source/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
alt="logo" style="width: 100px; height: 100px;">
<div class="space-y-12">
<p class="dark:text-white text-center">Stremio-Jackett{% if isCommunityVersion %} Community{% endif %}
v4.1.3</p>
v4.1.4</p>
<h1 class="text-base font-semibold leading-7 text-gray-900 dark:text-white"
style="text-align: center;font-size: 2rem;">
Addon configuration</h1>
Expand Down

0 comments on commit 533596a

Please sign in to comment.