From 6112d2989f5350705300c64565ce60c3ab628a62 Mon Sep 17 00:00:00 2001 From: Pixel-LH <2569646547@qq.com> Date: Mon, 2 Sep 2024 01:00:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:ova/oad=E9=9B=86=E6=95=B0=E7=B4=AF=E5=8A=A0?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/vcbanimemonitor/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/vcbanimemonitor/__init__.py b/plugins/vcbanimemonitor/__init__.py index 97ae16c..be92c38 100644 --- a/plugins/vcbanimemonitor/__init__.py +++ b/plugins/vcbanimemonitor/__init__.py @@ -400,20 +400,21 @@ class VCBAnimeMonitor(_PluginBase): return if remeta.is_ova and self._switch_ova: logger.info(f"{file_path.name} 为OVA资源,开始历史记录处理") - ova_history_ep_list = self.plugindata.get(file_meta.title, []) - if ova_history_ep_list: + ova_history_ep_list = self.get_data(file_meta.title) + if ova_history_ep_list and isinstance(ova_history_ep_list, list): ep = file_meta.begin_episode if ep in ova_history_ep_list: for i in range(1, 100): if ep + i not in ova_history_ep_list: ova_history_ep_list.append(ep + i) file_meta.begin_episode = ep + i + logger.info(f"{file_path.name} 为OVA资源,历史记录中已存在,自动识别为第{ep + i}集") break else: ova_history_ep_list.append(ep) - self.plugindata.put(file_meta.title, ova_history_ep_list) + self.save_data(file_meta.title, ova_history_ep_list) else: - self.plugindata.put(file_meta.title, [file_meta.begin_episode]) + self.save_data(file_meta.title, [file_meta.begin_episode]) else: return