Mark Books: "Show marked books" dynamic menu causing problematic behaviour in plugins that call it

Bug #1908762 reported by ownedbycats
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

Calibre 5.7 (x64)

Due to the changes in the "Show Marked Books (x)" menu entry, it can misbehave with plugins that attempt to call it. I can confirm this happens with two plugins:

1. Adding Show Marked Books to the Favourites Menu (https://www.mobileread.com/forums/showthread.php?t=183022) will cause it to become greyed out when the number of books change.

2. Action Chains (https://www.mobileread.com/forums/showthread.php?t=334974) has been having recurring problems with this entry causing the entire chain to fail when it's not found. See this for more information: https://www.mobileread.com/forums/showpost.php?p=4070964&postcount=137

Another thing to note: Although the Reading List plugin (https://www.mobileread.com/forums/showthread.php?t=134856) also has a menu entry "View Reading List (x)" that changes with the number of books, it doesn't have the same issue as Show Marked Books.

If there's a way to fix this, it'd be appreciated. Thank you!

description: updated
Revision history for this message
ownedbycats (ownedbycats) wrote :

Further inspection: Reading List appears to use a static menu entry ("View List: List Name") in the Favourites menu, and this also appears in Action Chains.

Revision history for this message
ownedbycats (ownedbycats) wrote :

Additional information: kiwidude's plugins all use a constant attribute called "favourites_menu_unique_name" for the dynamically-changing menu entries:
https://www.mobileread.com/forums/showthread.php?p=2129353#post2129353

summary: - Mark Books: "Show marked books" causing problematic behaviour in plugins
- that call it
+ Mark Books: "Show marked books" dynamic menu causing problematic
+ behaviour in plugins that call it
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1908762

The action changes its text based on how many marked books are present
just before the menu is displayed, that is not going to change. If a
plugin wants to refer to it, it can either match the text more carefully
taking into account both forms or create a wrapper action that is
connected to the actual action with fixed text.

 status invalid

Changed in calibre:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.