From 7cde6ce24324ca6dcc880ac69f90a55df1163749 Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Sun, 2 Feb 2025 10:18:08 +0100 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/polish/container.py | 2 +- src/calibre/ebooks/oeb/transforms/split.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index 49dca6605c..9e41a1f1a5 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -344,7 +344,7 @@ class Container(ContainerBase): # {{{ item_id = 'id' while item_id in all_ids: c += 1 - item_id = 'id' + f'{c}' + item_id = f'id{c}' manifest = self.opf_xpath('//opf:manifest')[0] href = self.name_to_href(name, self.opf_name) item = manifest.makeelement(OPF('item'), diff --git a/src/calibre/ebooks/oeb/transforms/split.py b/src/calibre/ebooks/oeb/transforms/split.py index 85381a000e..85b5ce1ec8 100644 --- a/src/calibre/ebooks/oeb/transforms/split.py +++ b/src/calibre/ebooks/oeb/transforms/split.py @@ -366,10 +366,10 @@ class FlowSplitter: elif size <= self.max_flow_size: self.split_trees.append(t) self.log.debug( - f'\t\t\tCommitted sub-tree #{len(self.split_trees)} ({size / 1024.0} KB)') + f'\t\t\tCommitted sub-tree #{len(self.split_trees)} ({size//1024} KB)') else: self.log.debug( - f'\t\t\tSplit tree still too large: {size / 1024.0} KB') + f'\t\t\tSplit tree still too large: {size//1024} KB') self.split_to_size(t) def find_split_point(self, root):