Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 08-17-2022, 03:21 AM   #1231
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Thanks again to kiwidude and the current maintainers of this awesome add-on to Calibre.

A long time ago I had changed the plugin code in order to make it not update dynamically the number of items in the lists, or else, not to display that number between parenthesis after the reading list title. I can't recall exactly what change was needed for me in the code.

Reason was that I had multiple clones of the Favourites plugin nicely arranged in the menubar, in order to offer a more interesting use of the plugin, for me personally.

Back then, I had something like this in the menubar:

- Publishers (Favourites Plugin menu "1" - named Publishers)
submenu item --- Public Domain
submenu item --- PublisherX
submenu item --- PublisherY

- Spiritual (Favourites Plugin menu "2" - named Spiritual)
submenu item --- authorA
submenu item --- authorB
submenu item --- authorC in myfavorites

Each submenu item was a reading list generated from a populated search like publisher:X, author:C #myfav:yes and so on.

And I used to place some other main menus, to make those submenu items easily and nicely arranged and accessible by two mouse clicks.

Then I thought I'd ask you to help me get the latest plugin version work like that for me. If i recall correctly, I modified the 1.66 version by intuitively removing some code that I figured would remove the dynamic updating (number of books in the list). By the way, I'm no coder.

As that modified version backup that I have is on a PC unavailable to me at this time, I thought I might have some kind of luck just reporting my use case.

I had planned to to do a text diff between the 1.66 version that you kindly provided me here and the modified one, but that's not viable ATM... And I mildly doubt that the 1.66 modified would work with Calibre 6/ QT6.

Oh I should clarify that, on the current plugin version (and the original one, of course) what happens is that, after adding the Reading Lists to the Favourites Menu, they soon become greyed out (unavailable). This happens because, for instance, the submenu item "author:C #myfav:yes" named as AuthorC Myfavs doesn't stay that way as soon as the number of books in that list is updated. So it isn't more AuthorC Myfavs, but rather becomes AuthorC Myfavs (20) or AuthorC Myfavs (21)...
Comfy.n is offline   Reply With Quote
Old 08-17-2022, 03:30 AM   #1232
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
BTW, I just day-dreamed how amazing it would be if it were possible to have 2 Reading Lists Plugins installed at the same time: one that works just like it's been crafted to, plus the "custom" mod I mentioned.
Comfy.n is offline   Reply With Quote
Advert
Old 08-17-2022, 09:47 AM   #1233
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Comfy.n View Post
Oh I should clarify that, on the current plugin version (and the original one, of course) what happens is that, after adding the Reading Lists to the Favourites Menu, they soon become greyed out (unavailable). This happens because, for instance, the submenu item "author:C #myfav:yes" named as AuthorC Myfavs doesn't stay that way as soon as the number of books in that list is updated. So it isn't more AuthorC Myfavs, but rather becomes AuthorC Myfavs (20) or AuthorC Myfavs (21)...
Are you sure about that?

I just checked it with the current versions of Reading List and Favourites Menu. While RL shows counts in its menus, the options offered while configuring FM are all "View List: ListName" and continue to work when the list changes size.

I use FM with RL entries myself, and since I maintain both plugins, I suspect that issue has been fixed.
JimmXinu is offline   Reply With Quote
Old 08-18-2022, 01:28 AM   #1234
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by JimmXinu View Post
Are you sure about that?

I just checked it with the current versions of Reading List and Favourites Menu. While RL shows counts in its menus, the options offered while configuring FM are all "View List: ListName" and continue to work when the list changes size.

I use FM with RL entries myself, and since I maintain both plugins, I suspect that issue has been fixed.
Ohhh yes, yes.

I just noticed that the most recent version of FM that I have installed (1.2.0) shows my RL items without counts!

On the other hand, the FM "clone" that I've been using lately (called stdy), was generated from the 1.1.0 version, and does show the counts.

I'm almost asleep and can't elaborate further today, but I thank you very much.... I attached some screenshots just to show you the versions thing. I'll also check in the weekend my .json files for each instance of the plugin





---
Attached Thumbnails
Click image for larger version

Name:	MWSnap0616 2022-08-18, 02_08_27.png
Views:	282
Size:	9.7 KB
ID:	195945   Click image for larger version

Name:	MWSnap0615 2022-08-18, 02_07_53.png
Views:	326
Size:	10.2 KB
ID:	195946   Click image for larger version

Name:	MWSnap0614 2022-08-18, 02_06_35.png
Views:	300
Size:	6.2 KB
ID:	195947   Click image for larger version

Name:	MWSnap0613 2022-08-18, 02_04_00.png
Views:	288
Size:	9.2 KB
ID:	195948  
Comfy.n is offline   Reply With Quote
Old 09-07-2022, 12:22 AM   #1235
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,988
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Can anyone else confirm this bug?

I have a reading list with 23 items currently on it. I open the 'edit list' dialog, select books 21 and 22, and press 'delete.'

If I use "shift" to multiple-select, it deletes 21 and 22. If I use "ctrl," it deletes 21 and 23.
ownedbycats is online now   Reply With Quote
Advert
Old 09-07-2022, 11:13 AM   #1236
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Interesting. If I ctrl-click 21 then 22, it works as expected. If I ctrl-click 22 then 21, it deletes 21, 22 AND 23.

RL just calls QTableWidget.selectionModel().selectedRows(). I suspect this is a bug in PyQt6. I very much doubt RL can do anything about it...
JimmXinu is offline   Reply With Quote
Old 09-07-2022, 01:21 PM   #1237
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
I couldn't reproduce this behavior after reading @ownedbycats post. But Jim's post gave me the clue, so I can now reproduce the behavior even in calibre 5.

I believe I dealt with something similar when coding the Action Chains plugin. So attached below is a proposed fix. I just did a quick copy/paste of the corresponding method in Action Chains with some minor modifications. Further testing will be needed.
Attached Files
File Type: zip Reading List.zip (117.0 KB, 227 views)
capink is offline   Reply With Quote
Old 09-07-2022, 07:18 PM   #1238
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Quote:
Originally Posted by Comfy.n View Post
On the other hand, the FM "clone" that I've been using lately (called stdy), was generated from the 1.1.0 version, and does show the counts.

---
Actually, I found out that RL calls Favourites Menu plugin unique name, hence my favourites menu clones would still show the counts.

Then I managed to remember how to customise RL (for my use case), by editing the lines containing len(list_content) and (%d) that refer to view_submenu_list_names. Now my FM clones work as usual.
Comfy.n is offline   Reply With Quote
Old 09-08-2022, 09:49 PM   #1239
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,988
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by capink View Post
I couldn't reproduce this behavior after reading @ownedbycats post. But Jim's post gave me the clue, so I can now reproduce the behavior even in calibre 5.

I believe I dealt with something similar when coding the Action Chains plugin. So attached below is a proposed fix. I just did a quick copy/paste of the corresponding method in Action Chains with some minor modifications. Further testing will be needed.
Just got a chance to test this version (damned Norwalk virus still having its way with me) -- it seems to fix the issue I described.

Last edited by ownedbycats; 09-08-2022 at 09:57 PM.
ownedbycats is online now   Reply With Quote
Old 09-08-2022, 11:37 PM   #1240
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version

2022-09-08
- Sort selectedRows on Edit List--qt gives them in user-selected order.


The issue is that when we get the list of selectedRows(), instead of being in table order, they are returned in the order selected by the user. And the removeRow() method's input parameter is row index.

If you delete 5 before 6, the list has shifted up and all the later indices have moved. But as long as you delete largest index to smallest, it's fine.

The RL code does reverse the list before deleting, so either selectedRows() once returned list order instead of user-selected order, or this has broken a long time...

capink's code works, but I think it changes more than needs to be. Attached version sorts the list without changing RL to call .model() several times.

'Fun' Fact -- Opinions Needed

I was searching for calls in RL to selectionModel().selectedRows() to check for other places with the same issue and I found a rather important one: Add to List.

When you select books in your library, RL calls selectionModel().selectedRows() on the library view table and get the same user-selected order behavior. Which is reflected in the order the books are put in the list!

Did anyone know this? I feel like this is something we should have noticed.

And should it be changed? I honestly it expected the order-in-list of added books to be the order-displayed, not user-selected-order.

At the very least, this general issue appears to be common to several plugins, FFF and Manage Series at least.

And EpubMerge selecting books...

Did I forget about this? Or just never notice it before?

Last edited by JimmXinu; 09-14-2022 at 10:13 AM. Reason: Remove obsolete test version
JimmXinu is offline   Reply With Quote
Old 09-09-2022, 12:42 AM   #1241
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,988
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I'd noticed it before in Reading List, though for some reason I thought it was due to 'add to list' being called from an action chain (which doesn't really make sense, but something something hindsight). Order-displayed makes more sense to me,
ownedbycats is online now   Reply With Quote
Old 09-09-2022, 07:32 AM   #1242
compurandom
Wizard
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 1,012
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
I only add books to reading list one at a time so I didn't notice there.

But I have noticed wonkyness with the Manage Series plugin that I couldn't figure out. Now that I know what it is doing, I think I like that behavior and I'll take advantage of it.
compurandom is offline   Reply With Quote
Old 09-09-2022, 10:44 AM   #1243
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by compurandom View Post
I only add books to reading list one at a time so I didn't notice there.

But I have noticed wonkyness with the Manage Series plugin that I couldn't figure out. Now that I know what it is doing, I think I like that behavior and I'll take advantage of it.
FYI, reviewing it this morning, the Manage Series delete function does work correctly.

But when selecting books without a series before opening Manage Series, the order selected by the user is used for initial order.
JimmXinu is offline   Reply With Quote
Old 09-09-2022, 12:03 PM   #1244
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,729
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Certainly when I wrote the plugins any such behavior was purely coincidental and wasn't something I planned for. Very interesting on Manage Series - that is *definitely* something I will take advantage of. I had wondered why it did such a bad job at times of ordering books initially, now I know
kiwidude is offline   Reply With Quote
Old 09-13-2022, 11:28 AM   #1245
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by JimmXinu View Post
New Test Version

2022-09-08
- Sort selectedRows on Edit List--qt gives them in user-selected order.
Nobody's downloaded that test version? I don't really want to release it if no one's even tried it...

I'm not planning to change the Add to List behavior since there doesn't seem to be a lot of interest in it--and that's been the behavior for 10+ years.
JimmXinu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Extract ISBN kiwidude Plugins 548 03-04-2025 10:43 PM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 AM
[GUI Plugin] Manage Sony x50 Reader Book List kpw Plugins 170 10-02-2014 08:23 PM
[GUI Plugin] Temp Marker kiwidude Plugins 41 10-14-2013 12:25 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 11:13 PM.


MobileRead.com is a privately owned, operated and funded community.