feature request: viewer 4 search history as in viewer 3

Bug #1847976 reported by Wim Hekken on 2019-10-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

As is clear from the summary; a viewer 4 search history as in viewer 3 would be handy.

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Wim Hekken (wim-hekken) wrote :

Thanks!!!

Wim Hekken (wim-hekken) wrote :

Installed 4.2

Still no history in the viewers search as promised.
Maybe in the next one?

Wim Hekken (wim-hekken) wrote :

no search history in viewer (yet?)

Changed in calibre:
status: Fix Released → In Progress

Works for me steps I tried:

1) Open viewer
2) Start search
3) Type: test and press enter
4) Close viewer
5) Open viewer, start serch
6) Type: t and the popup appears with test as an option

 status invalid

Changed in calibre:
status: In Progress → Invalid
Wim Hekken (wim-hekken) wrote :

You are absolutely right, after closing the viewer once the search phrases are rememberd.
I dont understand why this did not work in the first try.....
Is there a way to edit the history?

Kovid Goyal (kovid) wrote :

Look inthe calibre config directory it will be saved inside a json file
which you can edit using a text editor.

Wim Hekken (wim-hekken) wrote :

Thanks!

Wim Hekken (wim-hekken) on 2019-11-02
Changed in calibre:
status: Invalid → In Progress
Wim Hekken (wim-hekken) wrote :

After working with reader-4 for some time I notice that the search history is not that rock-solid as in reader-3.
The search phrases are forgotten very rapidly.
Your suggestion to look for them in a json file is only working for viewer-3; (C:\Users\XXX\AppData\Roaming\calibre\gui.py.json); after some fiddling one can delete or ADD search-words.

As far as I have found viewer-4 stores in C:\Users\XXX\AppData\Roaming\calibre\viewer-webengine.json; where the words/phrases are not kept for a long time and editing is not working for a long time either.

Am I correct? And can you make the search history more stable?

Thanks!

Kovid Goyal (kovid) on 2019-11-02
Changed in calibre:
status: In Progress → Invalid
Kovid Goyal (kovid) wrote :

Works fine for me, if you can isolate a set of steps that causes it to
not persist, let me know and I will take a look. Note that if you use
multiple instances of the viewer then the last one to do a searh or be
closed will have its history persisted, not the rest.

Wim Hekken (wim-hekken) wrote :

That's the problem, I cannot put my finger on it :-)

Am I correct that viewer-3 stores in C:\Users\XXX\AppData\Roaming\calibre\gui.py.json?
Editing there is working fine for viewer-3, but does nothing for viewer-4.

I suppose that viewer-4 is using C:\Users\XXX\AppData\Roaming\calibre\viewer-webengine.json, correct?

Editing there does not effect viewer-3, but sometimes, not always, works on viewer-4.
Maybe it is so that if I use viewer-4 and do not search at all, the previous searches are deleted.
Or if I search for a new word, the old one('s) are replaced?

Maybe the use of multiple viewer-4 instances causes the problem, I wil keep on trying.

Thanks fot thinking with me.

Kovid Goyal (kovid) wrote :

yes, you need viewer-webengine.json for the new viewer.

Wim Hekken (wim-hekken) on 2019-11-02
Changed in calibre:
status: Invalid → In Progress
Wim Hekken (wim-hekken) wrote :

I tested all day and came to the following conclusion:
If a searchword is not found, typed in complete/fresh or from the history, it is forgotten and not kept.
If I edit the json it only works as long as the searchwords are found, if not; deleted.
In this way one can not build up a list of often used searchwords like in viewer-3.

I realy hope you come to the same conclusion and fix it.

If not, is there a way to open the viewer-3 from Calibre?

I managed to do that from the explorer, there clicking on a epub opens the viewer-3 from a portable instalation.

Thank you very much.

Kovid Goyal (kovid) wrote :

Can you provide a set of steps to reproduce, I tried the following and
it failed:

1) Press /
2) Type notfound
3) Press Enter
4) Get a popup saying word was not found
5) Close viewer
6) Open viewer
7) Press /
8) Type n
9) notfound is present in the list of completions

Wim Hekken (wim-hekken) wrote :

OK, here we go:

I open a book, enter f.i. a words that can not be found.
I look in viewer-webengine.json and the word is there.
Then I search for a word that can be found.
If I look in viewer-webengine.json at that moment, with viewer stil open, I can see that only the last typed in word is there, the other one is gone.

Doing this the other way around, first a word that can be found, that appears in viewer-webengine.json.
Then a word that can not be found, that appears in viewer-webengine.json also.
Then the word that can be found again. If I look in viewer-webengine.json; the word that could not be found is gone.

Let change the last try, first a word that can be found, that appears in viewer-webengine.json.
Then a word that can not be found, that appears in viewer-webengine.json also.
But then the word that could not be found again: That erases the other word in viewer-webengine.json.

There are many more ways to test with words that can or can not be found, the outcom varies, but for sure word are lost.

Please fiddle around while checking viewer-webengine.json after every change, you wil see that building a list of search words like in viewer-3 is impossible.

Closing the viewer in between makes no difference, the changes in viewer-webengine.json are immediate.

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers