From a3c03c4bc718fcd9a65d4ded20eb697e6580ad29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20F=C3=BCrderer?= Date: Fri, 14 Jun 2019 11:12:56 +0200 Subject: [PATCH 1/2] Make search for texture name case-insensitive Fixes #47 --- server/texture-sync-server/src/search/query_filter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/texture-sync-server/src/search/query_filter.rs b/server/texture-sync-server/src/search/query_filter.rs index 22bcf98..e877af6 100644 --- a/server/texture-sync-server/src/search/query_filter.rs +++ b/server/texture-sync-server/src/search/query_filter.rs @@ -66,7 +66,7 @@ impl QueryFilter { SpecialInName(name) => Score::RequiredMatch( // - texture.name.contains(name), + texture.name.to_lowercase().contains(&name.to_lowercase()), ), SpecialBeforeDate(date) => Score::RequiredMatch(texture.added_on <= *date), From 86c05c03630490126aa0427602dd0401330954c8 Mon Sep 17 00:00:00 2001 From: Seil0 Date: Fri, 14 Jun 2019 11:18:58 +0200 Subject: [PATCH 2/2] show width x height, not the other way round --- .../org/hso/texturesyncclient/controller/RootController.kt | 2 +- .../hso/texturesyncclient/view/mainView/MainViewController.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt b/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt index dea6191..5fe3d02 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt @@ -51,7 +51,7 @@ class RootController : Controller() { val uuid = UUID.randomUUID() val format = if (File(path).extension.toLowerCase() == "png") TextureFormat.PNG else TextureFormat.JPEG val bimg = ImageIO.read(File(path)) //image for obtaining resolution - val resolution = Pair(bimg.height, bimg.width) + val resolution = Pair(bimg.width, bimg.height) val cal = Calendar.getInstance() //calendar obj with current time val hash = Sha256(data) diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainViewController.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainViewController.kt index fc2ae83..59d7e0c 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainViewController.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainViewController.kt @@ -60,7 +60,7 @@ class MainViewController : Controller() { } } - // DetailView actions + // MainView actions fun cvSearchAction(tags: ObservableList) { // show spinner, block ui