refactor(frontend): resolve linting errors, and EPUB reader lifecycle errors (#2127)

* refactor(types): improve type safety by replacing 'any' with specific types in various components

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* fix(filters): handle undefined values in filter streams and update type for selected filters

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* refactor(epub-reader): improve rendition cleanup and enhance debug logging in helper functions

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

* fix(epub-reader): handle errors during rendition and book destruction in ngOnDestroy

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>

---------

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
This commit is contained in:
Balázs Szücs
2026-01-08 15:21:23 -07:00
committed by GitHub
parent 14dcf552bd
commit 07c3affcd5
31 changed files with 92 additions and 63 deletions
@@ -12,7 +12,7 @@ export class MetadataProgressService implements OnDestroy {
private progressUpdatesSubject = new Subject<MetadataBatchProgressNotification>();
progressUpdates$ = this.progressUpdatesSubject.asObservable();
private activeTasksSubject = new BehaviorSubject<{ [taskId: string]: MetadataBatchProgressNotification }>({});
private activeTasksSubject = new BehaviorSubject<Record<string, MetadataBatchProgressNotification>>({});
activeTasks$ = this.activeTasksSubject.asObservable();
private metadataTaskService = inject(MetadataTaskService);
@@ -58,8 +58,8 @@ export class MetadataProgressService implements OnDestroy {
this.activeTasksSubject.next(this.getActiveTasks());
}
getActiveTasks(): { [taskId: string]: MetadataBatchProgressNotification } {
const result: { [taskId: string]: MetadataBatchProgressNotification } = {};
getActiveTasks(): Record<string, MetadataBatchProgressNotification> {
const result: Record<string, MetadataBatchProgressNotification> = {};
this.progressMap.forEach((subject, taskId) => {
result[taskId] = subject.getValue();
});