Implement support for comic book files (CBZ, CBR and CB7)

This commit is contained in:
aditya.chandel
2025-05-23 22:58:23 -06:00
committed by Aditya Chandel
parent 25ee510379
commit ff64362edb
56 changed files with 1617 additions and 141 deletions
+23 -1
View File
@@ -1,6 +1,6 @@
import {Shelf} from './shelf.model';
export type BookType = "PDF" | "EPUB";
export type BookType = "PDF" | "EPUB" | "CBX";
export interface Book {
id: number;
@@ -12,6 +12,7 @@ export interface Book {
addedOn?: string;
epubProgress?: EpubProgress;
pdfProgress?: PdfProgress;
cbxProgress?: CbxProgress;
filePath?: string;
fileSizeKb?: number;
}
@@ -26,6 +27,11 @@ export interface PdfProgress {
percentage: number;
}
export interface CbxProgress {
page: number;
percentage: number;
}
export interface BookMetadata {
bookId: number;
title: string;
@@ -102,9 +108,15 @@ export interface EpubViewerSetting {
flow: string;
}
export interface CbxViewerSetting {
pageSpread: CbxPageSpread;
pageViewMode: CbxPageViewMode;
}
export interface BookSetting {
pdfSettings?: PdfViewerSetting;
epubSettings?: EpubViewerSetting;
cbxSettings?: CbxViewerSetting;
[key: string]: any;
}
@@ -113,3 +125,13 @@ export interface BookRecommendation {
book: Book;
similarityScore: number;
}
export const enum CbxPageViewMode {
SINGLE_PAGE = 'SINGLE_PAGE',
TWO_PAGE = 'TWO_PAGE',
}
export const enum CbxPageSpread {
EVEN = 'EVEN',
ODD = 'ODD',
}