From 84908883209f468cdb4fb5c51ad33eb7665058dd Mon Sep 17 00:00:00 2001 From: SJC <59613197+metagrapher@users.noreply.github.com> Date: Tue, 4 Feb 2020 19:05:57 -0600 Subject: [PATCH] Made _app_for_name() into fuzzy finding _app_for_name() used to use an equality operator to check for a match, meaning that you had to know the full and exact name of the app you wished to invoke. This function now does a find operation on the app.name string, allowing for a partial match of the name. This has the limitation, of course, of only returning the first match. --- roku/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roku/core.py b/roku/core.py index 204da33..857d948 100644 --- a/roku/core.py +++ b/roku/core.py @@ -191,7 +191,7 @@ def __getitem__(self, key): def _app_for_name(self, name): for app in self.apps: - if app.name == name: + if app.name.find(name) > -1: return app def _app_for_id(self, app_id):