From 60a7f4d9f443bf1f94b02753d81bec34dc16ccb7 Mon Sep 17 00:00:00 2001 From: dyphire <61936050+dyphire@users.noreply.github.com> Date: Sat, 9 Nov 2024 03:11:45 +0800 Subject: [PATCH] fix(komga): non-english search not working (#782) Close #659 --- src/rust/multi.komga/res/source.json | 2 +- src/rust/multi.komga/src/lib.rs | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/rust/multi.komga/res/source.json b/src/rust/multi.komga/res/source.json index 75f299727..7bf579a89 100644 --- a/src/rust/multi.komga/res/source.json +++ b/src/rust/multi.komga/res/source.json @@ -3,7 +3,7 @@ "id": "multi.komga", "lang": "multi", "name": "Komga", - "version": 2, + "version": 3, "url": "https://komga.org", "nsfw": 0 }, diff --git a/src/rust/multi.komga/src/lib.rs b/src/rust/multi.komga/src/lib.rs index 54656fc75..cf32e6064 100644 --- a/src/rust/multi.komga/src/lib.rs +++ b/src/rust/multi.komga/src/lib.rs @@ -3,7 +3,7 @@ mod dto; extern crate alloc; use aidoku::{ error::{AidokuError, AidokuErrorKind, Result}, - helpers::uri::{encode_uri, encode_uri_component}, + helpers::uri::encode_uri, prelude::*, std::{defaults::defaults_get, net::Request, String, StringRef, Vec}, Chapter, Filter, FilterType, Listing, Manga, MangaPageResult, Page, @@ -69,18 +69,17 @@ fn get_manga_list(filters: Vec, page: i32) -> Result { let title = title.read(); if title.starts_with("regex:") { url.push_str("&search_regex="); - url.push_str(&encode_uri_component( - title + url.push_str(title .strip_prefix("regex:") .map(|v| v.trim()) .unwrap_or_default(), - )); + ); if !title.contains(",TITLE") && !title.contains(",TITLE_SORT") { url.push_str(",TITLE"); } } else { url.push_str("&search="); - url.push_str(&encode_uri_component(title)); + url.push_str(&title); } } }