View Single Post
Old Yesterday, 04:29 AM   #1532
un_pogaz
Chalut o/
un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.un_pogaz ought to be getting tired of karma fortunes by now.
 
un_pogaz's Avatar
 
Posts: 451
Karma: 678910
Join Date: Dec 2017
Device: Kobo
Okay. By checking the code, I found a possible way.

`gui.current_view().get_selected_ids()` allow to retrive the book id of the selected row, and `gui.current_view().select_rows()` allow to select the book base on their id `class calibre.gui2.library.views.BooksView. Additionaly, using this two function allow to mimic and preserve the selection order.

Beside @capink, get_selected_ids() it probably a better ways to retrive the book id than you current way.
Damn it, if you had GitHub or similiar, I could work on proposing a patch, to either transform the condition on a true filter, or add a new filter feature.
I'll see what I can do, but it won't be as clean to share you the full files like that.

Last edited by un_pogaz; Yesterday at 05:40 AM.
un_pogaz is offline   Reply With Quote