From f2c39fe9583b46126a8f6b2d734ca27348783f5e Mon Sep 17 00:00:00 2001 From: Kediny <43413989+Kediny@users.noreply.github.com> Date: Thu, 24 Oct 2024 23:40:12 +0100 Subject: [PATCH 1/4] lib.rs - fixed url Url had an "s" in the end. --- src/rust/wpcomics/sources/xoxocomics/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rust/wpcomics/sources/xoxocomics/src/lib.rs b/src/rust/wpcomics/sources/xoxocomics/src/lib.rs index 23c2be5f5..2c36a1d5b 100644 --- a/src/rust/wpcomics/sources/xoxocomics/src/lib.rs +++ b/src/rust/wpcomics/sources/xoxocomics/src/lib.rs @@ -73,7 +73,7 @@ fn get_page_list(_manga_id: String, chapter_id: String) -> Result> { #[modify_image_request] fn modify_image_request(request: Request) { template::modify_image_request( - String::from("https://xoxocomics.com"), + String::from("https://xoxocomic.com"), String::from("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36 Edg/101.0.1210.39"), request, ) From c44c73b959163afb021e456dc60b196087b89b8c Mon Sep 17 00:00:00 2001 From: Kediny <43413989+Kediny@users.noreply.github.com> Date: Thu, 24 Oct 2024 23:43:24 +0100 Subject: [PATCH 2/4] helper.rs - fixed listings and searches - changed listing urls - changed the way query urls are sent (keyword and page places were switched) - changed the way genre urls are sent (instead of being in a /genre/ sub url, all genre names are attached to the base url and have a -comic suffix now) --- src/rust/wpcomics/sources/xoxocomics/src/helper.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rust/wpcomics/sources/xoxocomics/src/helper.rs b/src/rust/wpcomics/sources/xoxocomics/src/helper.rs index 238cab0b4..188d36cfc 100644 --- a/src/rust/wpcomics/sources/xoxocomics/src/helper.rs +++ b/src/rust/wpcomics/sources/xoxocomics/src/helper.rs @@ -2,10 +2,10 @@ use aidoku::{prelude::format, std::String}; pub fn listing_map(listing: String) -> String { let url: &str = match listing.as_str() { - "Popular" => "popular-comics", - "Hot" => "hot", - "Completed" => "status/completed", - "Ongoing" => "status/ongoing", + "Popular" => "popular-comic", + "Hot" => "hot-comic", + "Completed" => "completed-comic", + "Ongoing" => "ongoing-comic", _ => "", }; String::from(url) @@ -14,9 +14,9 @@ pub fn listing_map(listing: String) -> String { // MARK: Other utilities pub fn get_search_url(base_url: String, query: String, genre: String, page: i32) -> String { if !query.is_empty() { - format!("{base_url}/search?page={page}&keyword={query}") + format!("{base_url}/search?keyword={query}&page={page}") } else if !genre.is_empty() { - format!("{base_url}/genre/{genre}?page={page}") + format!("{base_url}/{genre}-comic?page={page}") } else { base_url } From 909e2c314e17fd639fc90a9493a91b33ff2ec2b2 Mon Sep 17 00:00:00 2001 From: Kediny <43413989+Kediny@users.noreply.github.com> Date: Thu, 24 Oct 2024 23:43:57 +0100 Subject: [PATCH 3/4] source.json - updated source version --- src/rust/wpcomics/sources/xoxocomics/res/source.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rust/wpcomics/sources/xoxocomics/res/source.json b/src/rust/wpcomics/sources/xoxocomics/res/source.json index acc1e51fa..93f76c71f 100644 --- a/src/rust/wpcomics/sources/xoxocomics/res/source.json +++ b/src/rust/wpcomics/sources/xoxocomics/res/source.json @@ -3,7 +3,7 @@ "id": "en.xoxocomics", "lang": "en", "name": "XOXO Comics", - "version": 2, + "version": 3, "url": "https://xoxocomic.com/", "nsfw": 1 }, From 65d5d2f49e0aa9ea3a858f347801b4b72a3197c4 Mon Sep 17 00:00:00 2001 From: Kediny <43413989+Kediny@users.noreply.github.com> Date: Fri, 25 Oct 2024 01:26:58 +0100 Subject: [PATCH 4/4] Update helper.rs --- src/rust/wpcomics/sources/xoxocomics/src/helper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rust/wpcomics/sources/xoxocomics/src/helper.rs b/src/rust/wpcomics/sources/xoxocomics/src/helper.rs index 188d36cfc..da51939c2 100644 --- a/src/rust/wpcomics/sources/xoxocomics/src/helper.rs +++ b/src/rust/wpcomics/sources/xoxocomics/src/helper.rs @@ -14,7 +14,7 @@ pub fn listing_map(listing: String) -> String { // MARK: Other utilities pub fn get_search_url(base_url: String, query: String, genre: String, page: i32) -> String { if !query.is_empty() { - format!("{base_url}/search?keyword={query}&page={page}") + format!("{base_url}/search-comic?keyword={query}&page={page}") } else if !genre.is_empty() { format!("{base_url}/{genre}-comic?page={page}") } else {