From fceaee5ebe724da8b6da6e7840014ef70c587081 Mon Sep 17 00:00:00 2001 From: fugkco Date: Mon, 16 Oct 2023 00:13:58 +0100 Subject: [PATCH] Fix language --- resources/language/English/strings.po | 4 ++++ resources/language/messages.pot | 4 ++++ src/client.py | 4 +++- src/jackett.py | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/language/English/strings.po b/resources/language/English/strings.po index 129aed2..038f935 100644 --- a/resources/language/English/strings.po +++ b/resources/language/English/strings.po @@ -306,6 +306,10 @@ msgctxt "#32603" msgid "Unable to connect to Jackett, are your settings correct?" msgstr "" +msgctxt "#32604" +msgid "Requesting results from Jackett server..." +msgstr "" + msgctxt "#32700" msgid "Jackett returned error: {}" msgstr "" diff --git a/resources/language/messages.pot b/resources/language/messages.pot index 2b5dde8..ee48a23 100644 --- a/resources/language/messages.pot +++ b/resources/language/messages.pot @@ -307,6 +307,10 @@ msgctxt "#32603" msgid "Unable to connect to Jackett, are your settings correct?" msgstr "" +msgctxt "#32604" +msgid "Requesting results from Jackett server..." +msgstr "" + msgctxt "#32700" msgid "Jackett returned error: {}" msgstr "" diff --git a/src/client.py b/src/client.py index 377b314..ac6d823 100644 --- a/src/client.py +++ b/src/client.py @@ -195,9 +195,11 @@ def _get_with_progress(self, *args, **kwargs): r = self._session.get(*args, **kwargs) return r, r.content + prog_from, prog_to = 0, 25 + self._update_progress(prog_from, prog_to, 0, 100) + r = self._session.get(stream=True, *args, **kwargs) total_size = int(r.headers.get('content-length', 0)) - prog_from, prog_to = 0, 25 search_resp = b"" for chunk in r.iter_content(64 * 1024): if chunk: diff --git a/src/jackett.py b/src/jackett.py index 286896d..85bda08 100644 --- a/src/jackett.py +++ b/src/jackett.py @@ -176,7 +176,7 @@ def search_jackett(p_dialog, payload, method): return [] log.debug(f"Processing {method} with Jackett") - p_dialog.update(message="Requesting Jackett server...") + p_dialog.update(message=utils.translation(32604)) if method == 'movie': res = jackett.search_movie(payload["search_title"], payload['year'], payload["imdb_id"]) elif method == 'season':