Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cbhaley/calibre
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Jan 31, 2025
2 parents 58d13cc + 62d73ba commit 7a48a1a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/calibre/gui2/tag_browser/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,10 @@ def context_menu_handler(self, action=None, category=None,
# category is None if the user asked to specify a template
# index is None if the user clicked on a category (top level) node
# extra is a tuple: (icon_file_name: string or None, children: True or False)
def make_icon_name(key, index, db):
def make_icon_name(key, index, item_id):
icon_file_name = 'icon_' + sanitize_file_name(key)
if index is not None:
item_val = self._model.get_node(index).tag.original_name
item_id = db.new_api.get_item_id(key, item_val)
icon_file_name = f'{icon_file_name}@@{sanitize_file_name(item_val)}_{item_id}'
else:
item_val = None
Expand Down Expand Up @@ -714,7 +713,7 @@ def make_icon_name(key, index, db):
self.recount()
return
icon_file_name, for_children = extra if extra is not None else (None, None)
item_val, desired_file_name = make_icon_name(key, index, self.db)
item_val, desired_file_name = make_icon_name(key, index, self._model.get_node(index).tag.id)
if icon_file_name is None:
# User wants to specify a specific icon
try:
Expand Down

0 comments on commit 7a48a1a

Please sign in to comment.