refactor: split BookService into BookFileService and BookMetadataManageService (#2758)

This commit is contained in:
ACX
2026-02-14 22:07:57 -07:00
committed by GitHub
parent 0899b99188
commit c7f0a910e0
23 changed files with 543 additions and 475 deletions
@@ -16,6 +16,7 @@ import {ReaderLeftSidebarService} from './layout/panel/panel.service';
import {ReaderHeaderService} from './layout/header/header.service';
import {ReaderNoteService} from './features/notes/note.service';
import {BookService} from '../../book/service/book.service';
import {BookFileService} from '../../book/service/book-file.service';
import {ActivatedRoute} from '@angular/router';
import {Book, BookType} from '../../book/model/book.model';
import {ReaderHeaderComponent} from './layout/header/header.component';
@@ -73,6 +74,7 @@ export class EbookReaderComponent implements OnInit, OnDestroy {
private loaderService = inject(ReaderLoaderService);
private styleService = inject(ReaderStyleService);
private bookService = inject(BookService);
private bookFileService = inject(BookFileService);
private route = inject(ActivatedRoute);
private epubCustomFontService = inject(EpubCustomFontService);
private annotationService = inject(ReaderAnnotationHttpService);
@@ -283,7 +285,7 @@ export class EbookReaderComponent implements OnInit, OnDestroy {
}
private loadBookBlob(): Observable<void> {
return this.bookService.getFileContent(this.bookId, this.altBookType).pipe(
return this.bookFileService.getFileContent(this.bookId, this.altBookType).pipe(
switchMap(fileBlob => {
const fileUrl = URL.createObjectURL(fileBlob);
this._fileUrl = fileUrl;