From 1e59d3d6ac63af162cdfcfca6d898faf576170dc Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 29 Aug 2022 14:36:15 +0400 Subject: [PATCH 1/3] Use binary distribution of wx for appimage build --- .appveyor.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4acc8bded..c6a1f375e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -38,9 +38,10 @@ for: # run install pyfa packages and any other requirements - sh: AppDir/usr/bin/python -s -m pip install -U pip setuptools==41.6.0 wheel pathlib2 - - sh: AppDir/usr/bin/python -s -m pip install -r ../requirements.txt - # Speedup, but causes runtime incompatiblities - #- sh: AppDir/usr/bin/python -s -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 -r ../requirements.txt + # Use pre-built wx, since building it on appveyor takes almost full hour, which does not play nice with time limit + # Might cause compatibility issues, see https://wxpython.org/pages/downloads/index.html for more info + # - sh: AppDir/usr/bin/python -s -m pip install -r ../requirements.txt + - sh: AppDir/usr/bin/python -s -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 -r ../requirements.txt # Run scripts to prep pyfa data and build database - sh: cd ../ From 6543a2c225d0646ba9d80f563d51cbefdfd46df1 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 29 Aug 2022 15:22:32 +0400 Subject: [PATCH 2/3] Revert "Use binary distribution of wx for appimage build" This reverts commit 1e59d3d6ac63af162cdfcfca6d898faf576170dc. --- .appveyor.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index c6a1f375e..4acc8bded 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -38,10 +38,9 @@ for: # run install pyfa packages and any other requirements - sh: AppDir/usr/bin/python -s -m pip install -U pip setuptools==41.6.0 wheel pathlib2 - # Use pre-built wx, since building it on appveyor takes almost full hour, which does not play nice with time limit - # Might cause compatibility issues, see https://wxpython.org/pages/downloads/index.html for more info - # - sh: AppDir/usr/bin/python -s -m pip install -r ../requirements.txt - - sh: AppDir/usr/bin/python -s -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 -r ../requirements.txt + - sh: AppDir/usr/bin/python -s -m pip install -r ../requirements.txt + # Speedup, but causes runtime incompatiblities + #- sh: AppDir/usr/bin/python -s -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 -r ../requirements.txt # Run scripts to prep pyfa data and build database - sh: cd ../ From 7892e637b25476f2ca725df54543309ede43a356 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 29 Aug 2022 15:33:47 +0400 Subject: [PATCH 3/3] Force min query limit to be 1 for CJK languages in the market browser too --- config.py | 1 + service/market.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index 08d641195..23c0e6fdc 100644 --- a/config.py +++ b/config.py @@ -28,6 +28,7 @@ saveInRoot = False evemonMinVersion = "4081" minItemSearchLength = 3 +minItemSearchLengthCjk = 1 pyfaPath = None savePath = None diff --git a/service/market.py b/service/market.py index f24794fee..4dd9a65bb 100644 --- a/service/market.py +++ b/service/market.py @@ -35,6 +35,7 @@ from eos.gamedata import Category as types_Category, Group as types_Group, Item from service import conversions from service.jargon import JargonLoader from service.settings import SettingsProvider +from utils.cjk import isStringCjk pyfalog = Logger(__name__) _t = wx.GetTranslation @@ -152,7 +153,11 @@ class SearchWorkerThread(threading.Thread): requestTokens = self.jargonLoader.get_jargon().apply(requestTokens) all_results = set() - if len(' '.join(requestTokens)) >= config.minItemSearchLength: + joinedTokens = ' '.join(requestTokens) + if ( + (isStringCjk(joinedTokens) and len(joinedTokens) >= config.minItemSearchLengthCjk) + or len(joinedTokens) >= config.minItemSearchLength + ): for filter_ in filters: filtered_results = eos.db.searchItemsRegex( requestTokens, where=filter_,