From 0bb7114b612ffc46aeb83c34f841872a9cb00023 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 27 Jul 2024 20:52:25 -0300 Subject: Fix: plugin: opener: searcher: var name change --- packages/finder/main.py | 10 +++++----- packages/finder/plugin/searcher/file/name.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/finder/main.py b/packages/finder/main.py index 41bca79..bd593a4 100644 --- a/packages/finder/main.py +++ b/packages/finder/main.py @@ -66,7 +66,7 @@ class FinderMain(): await asyncio.sleep(0.01) # Update the list of items - self.update_list_buffer(await self.searcher.finder(cache=False)) + self.update_list_buffer(await self.searcher.finder(cached=False)) # Update the current selection self.change('') @@ -199,8 +199,8 @@ class FinderMain(): ] ) - async def load(self, cache=False): - self.update_list_buffer(await self.searcher.finder(cache=cache)) + async def load(self, cached=False): + self.update_list_buffer(await self.searcher.finder(cached=cache)) self.state['loading'] = False @@ -244,10 +244,10 @@ class FinderMain(): app = tg.create_task(self.app.run_async()) # Load initial buffer content from cache, if available - cache = tg.create_task(self.load(cache=True)) + cache = tg.create_task(self.load(cached=True)) # Load initial buffer content - load = tg.create_task(self.load(cache=False)) + load = tg.create_task(self.load(cached=False)) return True diff --git a/packages/finder/plugin/searcher/file/name.py b/packages/finder/plugin/searcher/file/name.py index 6ea97b7..9f35ea5 100644 --- a/packages/finder/plugin/searcher/file/name.py +++ b/packages/finder/plugin/searcher/file/name.py @@ -46,9 +46,9 @@ class FinderPluginFileNameSearcher(): self.path = path self.cache = os.path.join(cache_dir, 'plugin', 'searcher', 'file', os.path.abspath(self.path).replace(os.sep, '_') + '.json') - async def finder(self, cache = False): + async def finder(self, cached = False): # Check existing cache - if cache: + if cached: if os.path.exists(self.cache) and os.path.isfile(self.cache): with open(self.cache, 'r') as f: # Update the folder list in the background -- cgit v1.2.3