View Single Post
Old 04-13-2011, 10:56 AM   #32
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,469
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kiwidude View Post
Got you now. Could you do it with this: a search restriction of books that are in duplicate groups, with highlighting turned on to display the current group?

I think I could mark all books in duplicate groups as 'duplicate' in the marked ids dictionary, in addition to just the group under consideration as 'group_x_of_y'. So it could apply a search restriction of 'marked:duplicate', turn on highlighting (so all duplicate books displayed), and then do the normal 'marked:group_x_of_y' walking through groups?
This would work, as long as next_group does a text search instead of true.

To do this the best way, we would:
- need to add the ability for a plugin (or any other code) to apply an arbitrary search as a search restriction. This can be done rather easily by adding a 'current search' option to the restriction box. Selecting 'current search' will copy what is in the search box and apply it as a restriction. I will look at this, as it would be useful independent of duplicate detection.
- have the plugin apply the search 'marked:duplicates' as a restriction.
- make next and previous do as you described.

Quote:
I don't know how easy it is to do without looking into it (for instance can you set a restriction that isn't a saved search) and you have to consider restoring the user's state at the end by removing the restriction etc. Though I guess the user resolving the last group, or marking all groups as not duplicates would be one trigger. Toggling this menu item would be another.
Manually removing the "Arbitrary search" restriction would also work.
chaley is offline   Reply With Quote