From e97519ec67f287b1c39bb1bd6e37fa29f0c53592 Mon Sep 17 00:00:00 2001 From: Vladyslav <55681528+Sma1lON@users.noreply.github.com> Date: Wed, 22 Apr 2026 06:25:44 +0300 Subject: [PATCH] fix: Handle Rich Text Summary Field Change in RanobeLib parseNovel (#2130) --- plugins/russian/ranobelib.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/russian/ranobelib.ts b/plugins/russian/ranobelib.ts index f46b006..4ef4e37 100644 --- a/plugins/russian/ranobelib.ts +++ b/plugins/russian/ranobelib.ts @@ -29,7 +29,7 @@ class RLIB implements Plugin.PluginBase { name = 'RanobeLib'; site = 'https://ranobelib.me'; apiSite = 'https://api.cdnlibs.org/api/manga/'; - version = '2.2.2'; + version = '2.2.3'; icon = 'src/ru/ranobelib/icon.png'; webStorageUtilized = true; imageRequestInit = { @@ -120,7 +120,12 @@ class RLIB implements Plugin.PluginBase { path: novelPath, name: data.rus_name || data.name, 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) { @@ -658,7 +663,7 @@ type AgeRestriction = { type Branch = { id: number; - branch_id: null; + branch_id: number | null; created_at: string; teams: BranchTeam[]; user: User; @@ -695,7 +700,7 @@ type DataClass = { ageRestriction?: AgeRestriction; site?: number; type: string; - summary?: string; + summary?: string | { type: string; content: HTML[] }; is_licensed?: boolean; teams: DataTeam[]; genres?: Genre[];