Skip to content

Commit 9558f3d

Browse files
committed
fix: cloud storage check
1 parent c24c00b commit 9558f3d

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

epub_browser/assets/annotation.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,16 @@
488488
xhr.timeout = CONFIG.HEALTH_TIMEOUT;
489489

490490
xhr.onload = function() {
491-
self.available = xhr.status >= 200 && xhr.status < 300;
491+
if (xhr.status >= 200 && xhr.status < 300) {
492+
try {
493+
var resp = JSON.parse(xhr.responseText);
494+
self.available = resp.status === 'ok';
495+
} catch (e) {
496+
self.available = false;
497+
}
498+
} else {
499+
self.available = false;
500+
}
492501
resolve({ available: self.available });
493502
};
494503

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="epub-browser", # 在PyPI上显示的项目名称
9-
version="1.8.14", # 初始版本号
9+
version="1.8.15", # 初始版本号
1010
author="dfface", # 作者名
1111
author_email="dfface@sina.com", # 作者邮箱
1212
keywords="epub reader html export browser convert calibre-web calibre kindle web server local",

0 commit comments

Comments
 (0)