Skip to content

Commit

Permalink
enigma2-plugin-extensions-subssupport
Browse files Browse the repository at this point in the history
tryfix handlekey-error
  • Loading branch information
kueken committed Dec 20, 2022
1 parent 06a7d06 commit b22f268
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 0 deletions.
Expand Up @@ -4,11 +4,14 @@ AUTHOR = "Maroš Ondrášek <mx3ldev@gmail.com>"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

RDEPENDS_${PN} = "${PYTHON_PN}-requests ${PYTHON_PN}-xmlrpc ${PYTHON_PN}-compression ${PYTHON_PN}-codecs ${PYTHON_PN}-difflib unrar"

inherit autotools-brokensep gettext gittag ${PYTHON_PN}native python3-compileall

SRC_URI = "git://github.com/oe-mirrors/subssupport;protocol=https;branch=master"
SRC_URI_append = " file://0001-Revert-fix-subsMenu-navigation-handleKey-crash.patch"

S = "${WORKDIR}/git"

Expand Down
@@ -0,0 +1,80 @@
From dfbd253123227e24a6271082215077e2770dae23 Mon Sep 17 00:00:00 2001
From: kueken <ohnemailadresse@arcor.de>
Date: Tue, 20 Dec 2022 00:20:46 +0100
Subject: [PATCH] Revert "fix subsMenu navigation / handleKey crash"

This reverts commit ec1f630d84644e887b4949237f9730f4ab86f83f.
---
plugin/e2_utils.py | 2 +-
plugin/subtitles.py | 31 ++-----------------------------
2 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/plugin/e2_utils.py b/plugin/e2_utils.py
index 98b22d4..62b5e23 100644
--- a/plugin/e2_utils.py
+++ b/plugin/e2_utils.py
@@ -196,7 +196,7 @@ class ConfigFinalText(ConfigText):
def __init__(self, default="", visible_width=60):
ConfigText.__init__(self, default, fixed_size=True, visible_width=visible_width)

- def handleKey(self, key, callback=None):
+ def handleKey(self, key):
pass

def getValue(self):
diff --git a/plugin/subtitles.py b/plugin/subtitles.py
index e366128..47cf89d 100644
--- a/plugin/subtitles.py
+++ b/plugin/subtitles.py
@@ -1890,37 +1890,10 @@ class SubsMenu(Screen):
"cancel": self.cancel,
}, -2)

- self["menuactions"] = ActionMap(["NavigationActions"], {
- "top": self.top,
- "pageUp": self.pageUp,
- "up": self.up,
- "down": self.down,
- "pageDown": self.pageDown,
- "bottom": self.bottom
- }, -2)
-
self.onLayoutFinish.append(self.initTitle)
self.onLayoutFinish.append(self.initGUI)
self.onLayoutFinish.append(self.disableSelection)

- def top(self):
- self["menu_list"].top()
-
- def pageUp(self):
- self["menu_list"].pageUp()
-
- def up(self):
- self["menu_list"].up()
-
- def down(self):
- self["menu_list"].down()
-
- def pageDown(self):
- self["menu_list"].pageDown()
-
- def bottom(self):
- self["menu_list"].bottom()
-
def disableSelection(self):
self["subfile_list"].selectionEnabled(False)

@@ -3301,8 +3274,8 @@ class ConfigTextWithSuggestionsAndHistory(ConfigText):
self.__suggestions = None
self.currentWindow = None

- def handleKey(self, key, callback=None):
- ConfigText.handleKey(self, key, callback)
+ def handleKey(self, key):
+ ConfigText.handleKey(self, key)
if key in [KEY_DELETE, KEY_BACKSPACE, KEY_ASCII, KEY_TIMEOUT]:
self.getSuggestions()

--
2.25.1

0 comments on commit b22f268

Please sign in to comment.