mirror of
https://github.com/lifegpc/eh-downloader.git
synced 2026-07-08 01:31:00 +08:00
Add export zip task
This commit is contained in:
@@ -3,6 +3,10 @@ import { ConfigType } from "../config.ts";
|
||||
import { get_ws_host } from "./utils.ts";
|
||||
import { ConfigClientSocketData, ConfigSeverSocketData } from "./config.ts";
|
||||
import { DEFAULT_DOWNLOAD_CONFIG, DownloadConfig } from "../tasks/download.ts";
|
||||
import {
|
||||
DEFAULT_EXPORT_ZIP_CONFIG,
|
||||
ExportZipConfig,
|
||||
} from "../tasks/export_zip.ts";
|
||||
|
||||
export const cfg = signal<ConfigType | undefined>(undefined);
|
||||
|
||||
@@ -36,3 +40,11 @@ export function generate_download_cfg(): DownloadConfig {
|
||||
remove_previous_gallery: c.remove_previous_gallery,
|
||||
};
|
||||
}
|
||||
|
||||
export function generate_export_zip_cfg(): ExportZipConfig {
|
||||
if (!cfg.value) return DEFAULT_EXPORT_ZIP_CONFIG;
|
||||
const c = cfg.value;
|
||||
return {
|
||||
jpn_title: c.export_zip_jpn_title,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,3 +8,5 @@ export type GalleryData = {
|
||||
};
|
||||
|
||||
export type GalleryResult = JSONResult<GalleryData>;
|
||||
|
||||
export type GalleryListResult = JSONResult<GMeta[]>;
|
||||
|
||||
Reference in New Issue
Block a user