View Single Post
Old 07-16-2016, 11:43 PM   #117
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: 7,030
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
(mariaclaudia -- Look for your name down below for your actual problem.)

Both the Search Restriction and Saved Search dropdowns in the plugin show only the Saved Searches list. So I believe theducks is mistaken.

I believe BR is correct saying that the Search Restriction setting is from the pre-Virtual Library days. The Calibre code for Virtual Libraries still has 'search restriction' in the file name.

And there is still an 'Additional restriction' feature in Calibre. It's under Virtual Library and works by applying a named (or current) search as an additional filter on top of the defined Virtual Library search. I assume backward compatibility is the primary (only?) reason that is still there. Virtual Library and Additional restriction and normal Search seems excessive...

The View Manager PI does set it's configured Search Restriction to the VL 'Additional restriction', but not perfectly.

It doesn't remove the 'Additional restriction' when switching to another view, nor does it set it again if you've cleared the 'Additional restriction' with the 'Close the Virtual Library' button. (Saved Searches applied by View Manager are also not reset, but those are much more visible.)

The 'Close the Virtual Library' button part is arguably a bug in Calibre's VL/search restriction code. The clear_vl button in search_restriction_mixin.py resets the restriction, but doesn't clear the search_restriction ComboBox. The PI looks at the contents of the search_restriction ComboBox and skips applying the search restriction if it contains the same setting.

I am able to fix/workaround both issues by tweaking the PI code to always set the search restriction (resetting it to '' for views that don't have a search restriction).

But is that useful? Would it be better to remove the PI Search Restriction settings? Or instead show the list of Virtual Libraries and switch to the chosen VL?

None of which addresses mariaclaudia's reported issue with Saved Search.

mariaclaudia -- Looking at your screen captures, I believe you have a saved search named series:true but it doesn't contain the search series:true.
  1. Look at the attached image.
  2. You should left click and hold the button I've marked in red until you get a menu.
  3. One of the options will be 'Manage Saved Searches' (in your language), click it.
  4. You will then get the 'Saved Search Editor' also shown. Use the drop down labeled 'Saved Search' to select your saved search series:true.
  5. If I'm right, there won't be anything where I've marked in blue on the image.
  6. Enter series:true where I've marked in blue on the image.
  7. Click OK.

That should solve your problem.

Another way to do the same thing is to enter series:true into first the regular search bar, then again in the saved search bar, then click (without holding) the button marked in red.

You can name the search something different (that's kind of the point of saved searches), but you'd have to go back and change the View Manager setting then.

Hope that helps.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	836
Size:	45.3 KB
ID:	150250  
JimmXinu is offline   Reply With Quote