rschroll / beru

The Basic Epub Reader for Ubuntu
http://rschroll.github.io/beru/
GNU General Public License v3.0
25 stars 12 forks source link

Library view shows under boot "Could not open this book" #26

Closed lintujuh closed 10 years ago

lintujuh commented 10 years ago

When I copied some of my ebooks to my Ubuntu Touch device I left by mistake the books under the ownership of root. I noticed my mistake and changed the owner and group to phablet. I had already started Beru once. Now when the access rights are set right and I can read the books, still in the Library view Beru shows under the title and author "Could not open this book".

rschroll commented 10 years ago

Yeah, it would do that. I see two ways to deal with this. We could check all "bad" books at start up each time, to see if they've been fixed. Or we could regenerate the cover information when a "bad" book is successfully opened. Or both, potentially.

If this bothers you now, you can force Beru to regenerate the covers by deleting the database with this information. It should be something like ~/.local/share/com.ubuntu.developer.rschroll.beru/Databases/e47....sqlite.

rschroll commented 10 years ago

This was slightly trickier than I anticipated. The covers are updated one at a time until there are no more left. Thus, we can't look for error condition covers, as that leaves us in the update loop. So we go with option 2 and update the cover when we manage to open a book that had caused errors.

This should be fixed in the next version to hit the app store, but that may be a few days.

lintujuh commented 10 years ago

It is only an aesthetic problem. I won't regenerate the database so I can confirm that the problem is fixed with the future version.