Skip to content
This repository was archived by the owner on Nov 20, 2021. It is now read-only.

Commit 5a1a172

Browse files
committed
Do space replaces
1 parent e2150c2 commit 5a1a172

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

‎src/CatManga/CatManga.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const BASE = "https://catmanga.org"
1515

1616
export const CatMangaInfo: SourceInfo = {
1717
icon: "icon.png",
18-
version: "1.2.4",
18+
version: "1.2.8",
1919
name: "CatManga",
2020
author: "PythonCoderAS",
2121
authorWebsite: "https://github.com/PythonCoderAS",
@@ -101,6 +101,9 @@ export class CatManga extends Source {
101101
async searchRequest(query: SearchRequest, metadata: any): Promise<PagedResults> {
102102
// TODO: Wait for search to be implemented on the website.
103103
const results = (await this.getWebsiteMangaDirectory(null)).results;
104+
if (query.title){
105+
query.title = query.title.replace(/\+/g, " ").trim();
106+
}
104107
const data: MangaTile[] = [];
105108
for (let i = 0; i < results.length; i++) {
106109
const key = results[i];
@@ -110,6 +113,7 @@ export class CatManga extends Source {
110113
}
111114
}
112115
}
116+
console.log(data.length)
113117
return createPagedResults({
114118
results: data
115119
});

‎src/DankeFurs/DankeFurs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const BASE = "https://danke.moe"
55

66
export const DankeFursInfo: SourceInfo = {
77
icon: "icon.png",
8-
version: "1.0.1",
8+
version: "1.0.5",
99
name: "DankeFurs",
1010
author: "PythonCoderAS",
1111
authorWebsite: "https://github.com/PythonCoderAS",

‎src/GuyaTemplate.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ export abstract class GuyaTemplate extends Source {
125125

126126
let result = typeof data.data === "string" ? JSON.parse(data.data) : data.data
127127
let query = searchQuery.title ?? ''
128-
128+
if (query){
129+
query = query.replace(/\+/g, " ").trim();
130+
}
129131
let filteredResults = Object.keys(result).filter((e) =>
130132
e.toLowerCase().includes(query.toLowerCase())
131133
)

‎src/MahouShoujoBu/MahouShoujoBu.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const BASE = "https://mahoushoujobu.com/"
55

66
export const MahouShoujoBuInfo: SourceInfo = {
77
icon: "icon.png",
8-
version: "1.0.1",
8+
version: "1.0.2",
99
name: "MahouShoujoBu",
1010
author: "PythonCoderAS",
1111
authorWebsite: "https://github.com/PythonCoderAS",

0 commit comments

Comments
 (0)