fix: Handle Rich Text Summary Field Change in RanobeLib parseNovel (#2130)

This commit is contained in:
Vladyslav
2026-04-22 06:25:44 +03:00
committed by GitHub
parent a37ddf6c4c
commit e97519ec67
+9 -4
View File
@@ -29,7 +29,7 @@ class RLIB implements Plugin.PluginBase {
name = 'RanobeLib'; name = 'RanobeLib';
site = 'https://ranobelib.me'; site = 'https://ranobelib.me';
apiSite = 'https://api.cdnlibs.org/api/manga/'; apiSite = 'https://api.cdnlibs.org/api/manga/';
version = '2.2.2'; version = '2.2.3';
icon = 'src/ru/ranobelib/icon.png'; icon = 'src/ru/ranobelib/icon.png';
webStorageUtilized = true; webStorageUtilized = true;
imageRequestInit = { imageRequestInit = {
@@ -120,7 +120,12 @@ class RLIB implements Plugin.PluginBase {
path: novelPath, path: novelPath,
name: data.rus_name || data.name, name: data.rus_name || data.name,
cover: data.cover?.default || defaultCover, cover: data.cover?.default || defaultCover,
summary: data.summary?.trim(), summary:
typeof data.summary === 'string'
? data.summary.trim()
: data.summary?.type === 'doc'
? jsonToHtml(data.summary.content, [])
: undefined,
}; };
if (data.status?.id) { if (data.status?.id) {
@@ -658,7 +663,7 @@ type AgeRestriction = {
type Branch = { type Branch = {
id: number; id: number;
branch_id: null; branch_id: number | null;
created_at: string; created_at: string;
teams: BranchTeam[]; teams: BranchTeam[];
user: User; user: User;
@@ -695,7 +700,7 @@ type DataClass = {
ageRestriction?: AgeRestriction; ageRestriction?: AgeRestriction;
site?: number; site?: number;
type: string; type: string;
summary?: string; summary?: string | { type: string; content: HTML[] };
is_licensed?: boolean; is_licensed?: boolean;
teams: DataTeam[]; teams: DataTeam[];
genres?: Genre[]; genres?: Genre[];