🍼 OPDS feed debugging for Panels on iOS

This commit is contained in:
2021-09-21 10:06:11 -07:00
parent 3aa5ea3427
commit a7afc358d8
2 changed files with 12 additions and 3 deletions

View File

@@ -47,7 +47,8 @@ export const AcquisitionPanel = (
// pattern: "Templier T2.cbr",
extensions: ["cbz", "cbr"],
},
hub_urls: ["comic-scans.no-ip.biz:24674"],
// "comic-scans.no-ip.biz:24674",
hub_urls: ["perfection.comichub.org:777"],
priority: 5,
};

View File

@@ -18,13 +18,19 @@ router.use("/opds", async (req, res, next) => {
title: `title`,
subtitle: `subtitle`,
icon: "/favicon.ico",
link: {
rel: EnumLinkRel.SELF,
href: "/opds-catalogs/root.xml",
type: "application/atom+xml;profile=opds-catalog;kind=navigation",
} as Link,
}),
[
async (feed: Feed) => {
feed.id = "bastard12312899lfh-1238989123-1231289812";
feed.books = feed.books || [];
await FastGlob(["*.cbr", "*.cbz", "*.cb7", "*.cba", "*.cbt"], {
cwd: path_of_books,
}).each((file) => {
}).each((file, idx) => {
const ext = extname(file);
const title = basename(file, ext);
const href = encodeURI(`/file/${file}`);
@@ -32,6 +38,7 @@ router.use("/opds", async (req, res, next) => {
const entry = Entry.deserialize<Entry>({
title,
id: idx,
links: [
{
rel: EnumLinkRel.ACQUISITION,
@@ -42,7 +49,7 @@ router.use("/opds", async (req, res, next) => {
});
if (!isUndefined(feed) && !isUndefined(feed.books)) {
console.log("haramzada", feed.books);
console.log("ENTRY", entry)
feed.books.push(entry);
}
});
@@ -52,6 +59,7 @@ router.use("/opds", async (req, res, next) => {
],
).then((feed) => {
res.setHeader("Content-Type", "application/xml");
console.log("FFFEEDD", feed);
return res.end(feed.toXML());
});
});