Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(module): manhuaren #17

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/modules/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as ZeroBywDownloader } from "./zerobyw";
export { default as CopymangaDownloader } from "./copymanga";
export { default as GanmaDownloader } from "./ganma";
export { default as ManhuarenDownloader } from "./ganma";
1 change: 1 addition & 0 deletions src/modules/manhuaren/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare namespace ManhuarenAPI {}
29 changes: 29 additions & 0 deletions src/modules/manhuaren/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/// <reference path="./index.d.ts" />

import ComicDownloader from "../../core";

export default class ManhuarenDownloader extends ComicDownloader {
static readonly siteName = "manhuaren";

static canHandleUrl(url: string): boolean {
return /manhuaren/.test(url);
}

static readonly preferredCLIPresets: Partial<CliOptions> = {};

static urlCompletion(shorthandUrl: string): string {
return shorthandUrl;
}

constructor(protected destination: string, protected configs: Configs = {}) {
super(destination, configs);
}

async getSerieInfo(url: string): Promise<SerieInfo> {
throw new Error("Method not implemented.");
}
protected async getImageList(url: string): Promise<(string | null)[]> {
throw new Error("Method not implemented.");
}
}