From da9426aaabfd85e7201b7edfb41483fa69238794 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 26 Sep 2022 22:30:49 +0530 Subject: [PATCH] DRYer --- src/calibre/ebooks/oeb/polish/toc.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/calibre/ebooks/oeb/polish/toc.py b/src/calibre/ebooks/oeb/polish/toc.py index 0c51eb4b3b..8dbe2cebc6 100644 --- a/src/calibre/ebooks/oeb/polish/toc.py +++ b/src/calibre/ebooks/oeb/polish/toc.py @@ -281,12 +281,8 @@ def find_existing_nav_toc(container): def mark_as_nav(container, name): - from calibre.ebooks.metadata.opf3 import read_prefixes, set_unique_property if container.opf_version_parsed.major > 2: - prefixes = read_prefixes(container.opf) - href = container.href_to_name(name, container.opf_name) - if set_unique_property('nav', container.opf, prefixes, href): - container.dirty(container.opf_name) + container.apply_unique_properties(name, 'nav') def get_x_toc(container, find_toc, parse_toc, verify_destinations=True):