mirror of
https://git.luna-app.eu/50n50/sources
synced 2025-12-21 21:26:19 +01:00
Update audible/audible.js
This commit is contained in:
parent
eda07e6430
commit
08ad0ca92f
1 changed files with 13 additions and 1 deletions
|
|
@ -25,8 +25,20 @@ async function searchResults(keyword) {
|
|||
if (data.books && Array.isArray(data.books)) {
|
||||
foundBooks = true;
|
||||
for (const book of data.books) {
|
||||
let title = book.title || "Untitled";
|
||||
title = title.replace(/\s+free\s+online\s*$/i, '')
|
||||
.replace(/\s+audiobook\s+free\s+online\s*$/i, '')
|
||||
.replace(/\s+audiobook\s+free\s*$/i, '')
|
||||
.replace(/\s+free\s+audiobook\s*$/i, '')
|
||||
.replace(/\s+free\s*$/i, '')
|
||||
.replace(/\s+\(free\s*\)\s*$/i, '')
|
||||
.replace(/\s+free\s+read\s+/i, ' read ')
|
||||
.replace(/\s+\(.*?free.*?\)\s*$/i, '')
|
||||
.replace(/\s+audiobook\s*$/i, '')
|
||||
.trim();
|
||||
|
||||
results.push({
|
||||
title: book.title || "Untitled",
|
||||
title: title,
|
||||
image: book.image || "",
|
||||
href: "https://mapple.site/listen/" + (book.$id || "") + "/" + encodeURIComponent(book.title || "untitled")
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue