mirror of
https://github.com/ld3z/new-manga.git
synced 2026-11-09 20:13:44 -07:00
add covers to custom feeds as well as implement uniqueIds
This commit is contained in:
parent
5d4802607e
commit
16993baa78
4 changed files with 106 additions and 2 deletions
|
|
@ -117,6 +117,9 @@ interface ChapterDetail {
|
|||
md_comics: {
|
||||
title: string;
|
||||
slug: string;
|
||||
md_covers?: {
|
||||
b2key: string;
|
||||
}[];
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -154,11 +157,13 @@ export async function getChaptersByHid(
|
|||
ordering: '-created_at'
|
||||
});
|
||||
|
||||
// Fetch comic details including cover
|
||||
const comicResponse = await fetchWithRetry(
|
||||
`https://api.comick.fun/comic/${hid}`
|
||||
);
|
||||
const comicData = await comicResponse.json();
|
||||
const comicTitle = comicData?.comic?.title || 'Unknown Comic';
|
||||
const covers = comicData?.comic?.md_covers || [];
|
||||
|
||||
const response = await fetchWithRetry(
|
||||
`https://api.comick.fun/comic/${hid}/chapters?${queryParams}`
|
||||
|
|
@ -187,7 +192,8 @@ export async function getChaptersByHid(
|
|||
updated_at: chapter.publish_at || chapter.created_at || chapter.updated_at,
|
||||
md_comics: {
|
||||
title: comicTitle,
|
||||
slug: slug
|
||||
slug: slug,
|
||||
md_covers: covers // Add covers to the response
|
||||
}
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue