Skip to content

Commit 38a0777

Browse files
committed
fix: tags in library
1 parent 4b2b2b1 commit 38a0777

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Then a browser will be opened to view the epub file.
6767

6868
If there are errors or some mistakes in epub files, then you can use [calibre](https://calibre-ebook.com/) to convert to epub again.
6969

70-
Tags can be managed by [calibre](https://calibre-ebook.com/).
70+
Tags can be managed by [calibre](https://calibre-ebook.com/). After adding tags, **you should click "Edit book" and just close the window to update the epub file** or the tags will not change in the browser.
7171

7272
Just find calibre library and run `epub-browser .`, it will collect all books that managed by calibre.
7373

epub_browser/library.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,11 +551,12 @@ def create_library_home(self):
551551
</head>
552552
<body>
553553
"""
554-
all_tags = []
554+
all_tags = set()
555555
for book_hash, book_info in self.books.items():
556556
cur_tags = book_info['tags']
557557
if cur_tags:
558-
all_tags.extend(cur_tags)
558+
for cur_tag in cur_tags:
559+
all_tags.add(cur_tag)
559560

560561
library_html += f"""
561562
<div class="container">

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.1.3", # 初始版本号
9+
version="1.1.4", # 初始版本号
1010
author="dfface", # 作者名
1111
author_email="dfface@sina.com", # 作者邮箱
1212
keywords="epub reader html export browser convert calibre-web calibre",

0 commit comments

Comments
 (0)