feat: refresh in libraries and books lists
This commit is contained in:
@@ -4,6 +4,7 @@ import { KomgaBook, KomgaSeries } from "@/types/komga";
|
||||
import { BookService } from "./book.service";
|
||||
import { ImageService } from "./image.service";
|
||||
import { PreferencesService } from "./preferences.service";
|
||||
import { serverCacheService } from "./server-cache.service";
|
||||
|
||||
export class SeriesService extends BaseApiService {
|
||||
static async getSeries(seriesId: string): Promise<KomgaSeries> {
|
||||
@@ -22,6 +23,10 @@ export class SeriesService extends BaseApiService {
|
||||
}
|
||||
}
|
||||
|
||||
static async clearSeriesCache(seriesId: string) {
|
||||
serverCacheService.delete(`series-${seriesId}`);
|
||||
}
|
||||
|
||||
static async getSeriesBooks(
|
||||
seriesId: string,
|
||||
page: number = 0,
|
||||
@@ -48,6 +53,10 @@ export class SeriesService extends BaseApiService {
|
||||
}
|
||||
}
|
||||
|
||||
static async clearSeriesBooksCache(seriesId: string) {
|
||||
serverCacheService.deleteAll(`series-${seriesId}-books`);
|
||||
}
|
||||
|
||||
static async getFirstBook(seriesId: string): Promise<string> {
|
||||
try {
|
||||
const config = await this.getKomgaConfig();
|
||||
|
||||
Reference in New Issue
Block a user