From 3def97db92e173c9b9907a683f26de1ac918a152 Mon Sep 17 00:00:00 2001 From: wanxp <977741432@qq.com> Date: Tue, 12 Sep 2023 15:41:40 +0800 Subject: [PATCH] fix cookie login failed --- manifest.json | 2 +- package.json | 2 +- src/org/wanxp/main.ts | 6 +++++- versions.json | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 4036a2a..4790157 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-douban-plugin", "name": "Douban", - "version": "1.8.9", + "version": "1.9.0", "minAppVersion": "0.12.0", "description": "This is a plugin that can import movies/books/musics/notes/games info data from Douban for Obsidian .", "author": "Wanxp", diff --git a/package.json b/package.json index c212675..472697c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-douban-plugin", - "version": "1.8.9", + "version": "1.9.0", "description": "This is a plugin for Obsidian (https://obsidian.md) that can import data from Douban (https://www.douban.com/).", "main": "main.js", "scripts": { diff --git a/src/org/wanxp/main.ts b/src/org/wanxp/main.ts index 46f6d1e..0eabe98 100644 --- a/src/org/wanxp/main.ts +++ b/src/org/wanxp/main.ts @@ -208,7 +208,11 @@ export default class DoubanPlugin extends Plugin { this.userComponent = new UserComponent(this.settingsManager); this.netFileHandler = new NetFileHandler(this.fileHandler); if (this.userComponent.needLogin()) { - await this.userComponent.loginByCookie(); + try { + await this.userComponent.loginByCookie(); + }catch (e) { + log.debug(i18nHelper.getMessage('100101')); + } } this.addSettingTab(new DoubanSettingTab(this.app, this)); diff --git a/versions.json b/versions.json index d33d807..cf2350b 100644 --- a/versions.json +++ b/versions.json @@ -34,6 +34,7 @@ "1.8.6": "0.12.0", "1.8.7": "0.12.0", "1.8.8": "0.12.0", - "1.8.9": "0.12.0" + "1.8.9": "0.12.0", + "1.9.0": "0.12.0" }