Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screensaver (book cover) doesn't work (ToDo: store 1st page screenshot to bookcover file) #2095

Closed
mwozny123 opened this issue Jun 20, 2016 · 18 comments

Comments

@mwozny123
Copy link

mwozny123 commented Jun 20, 2016

Short sum up discussion: #2095 (comment)

  • KOReader version: koreader-nightly
  • Device: Pocketbook touch Lux 3 (626)

Issue

Koreader is looking for invalid filename (or rather extension).
[116 : ./luajit] Cannot open bitmap: /mnt/ext1/system/logo/bookcover.bmp
[116 : ./luajit] Cannot open bitmap: /mnt/ext1/system/logo/bookcover.BMP
[116 : ./luajit] Cannot open bitmap: /ebrmain/logo/bookcover.bmp
[116 : ./luajit] Cannot open bitmap: /ebrmain/logo/bookcover.BMP
[116 : ./luajit] Cannot open bitmap: /mnt/ext1/system/logo/bookcover.bmp
[116 : ./luajit] Cannot open bitmap: /mnt/ext1/system/logo/bookcover.BMP
[116 : ./luajit] Cannot open bitmap: /ebrmain/logo/bookcover.bmp
[116 : ./luajit] Cannot open bitmap: /ebrmain/logo/bookcover.BMP

Full log:
koreaderSHUTD2.txt

Correct file name used by Pocketbook system:

/mnt/ext1/system/logo/bookcover (without .bmp extension)

Here's a confirmation:
$ ls mnt/ext1/system/logo/
bookcover off_W626.bmp pb_shutdownlogo.bmp
$ ls ebrmain/logo
$ ls ebrmain/logo2
off_W626.bmp.XC3 off_W626.bmp.XD4

/mnt/ext1/system/logo/bookcover is my current screensaver - book cover from last opened in Pocketbook browser book.

This file should be replaced with last book cover last read in Koreader.

Steps to reproduce

Start Koreader, open a book, when device is shutdowns it displays last read in Pocketbook's reader book cover (instead of Koreaders).

@mwozny123 mwozny123 changed the title Koreader screensaver (book cover) doesn't work (not found) Koreader screensaver (book cover) doesn't work (wrong file extension) Jun 20, 2016
@houqp
Copy link
Member

houqp commented Jun 21, 2016

The log you pasted is actually not coming from koreader, but the pocketbook SDK library. So there is nothing we can do. During device shutdown, the pocketbook framework will close koreader and then set the screensaver i believe. KOReader already lose control to the device at that point.

@houqp houqp closed this as completed Jun 21, 2016
@mwozny123
Copy link
Author

mwozny123 commented Jun 26, 2016

If we could create 1st page screenshot (I believe Koreader has such feature) and name it :
/mnt/ext1/system/logo/bookcover.bmp
it would be fully integrated with system.

File type should be BMP file (size 758 x 904 px (probably device screen resolution), if needed I can check other sizes?).

Are you sure this log/entry is not from Koreader? Here's a clean crash.log.txt (created by Koreader) with the same log entry.

Anyway If we could just save a 1st page screenshot under above location it will be fixed;)

@houqp
Copy link
Member

houqp commented Jun 26, 2016

Yes, I am sure those lines are coming from the native pocketbook framework. Is that file suppose to be overridden by 3rd party applications?

@mwozny123
Copy link
Author

Once Koreader is installed all ebook formats are associated with Koreader:
https://github.com/koreader/koreader/blob/master/platform/pocketbook/extensions.cfg

And so build-in reader is totally replaced by Koreader, and there's no option to start build-in reader.

Default, build-in reader had a function to store 1st page (cover) screenshot as file:
/mnt/ext1/system/logo/bookcover.

[Other file names are listed in my 1st post. They are search from the top (needs confirming).
but if /mnt/ext1/system/logo/bookcover exist and so does /mnt/ext1/system/logo/bookcover.bmp it uses the second one.]

Build-in application was storing book cover as:
/mnt/ext1/system/logo/bookcover
So each time you changed a book it was updated.

Now after koreader installation, when we replaced build-in system reader, Koreader is NOT creating such file, and so all the time old (book cover) is used (can be very old;).

So if you a reading a new book, last opened in system reader book cover is used, no matter that it was year ago (or more) and you have read in that time 100 books, still the old cover (last read in system build-in reader) is used.

@houqp
Copy link
Member

houqp commented Jun 28, 2016

I see, and this only affects the screen after shutdown? KOReader should update the screen properly while it still has control of the screen.

@mwozny123
Copy link
Author

To sum up discussion:
TODO
- each time koreader opens a new book, first page (cover) screenshot should be saved as:
/mnt/ext1/system/logo/bookcover

@mwozny123 mwozny123 changed the title Koreader screensaver (book cover) doesn't work (wrong file extension) Screensaver (book cover) doesn't work (ToDo: store 1st page screenshot to bookcover file) Jun 29, 2016
@houqp
Copy link
Member

houqp commented Jun 30, 2016

@mwozny123 can you confirm that this is used after device is shutdown? If that's the case, we only have to write it out during poweroff event. Doing this everytime a book is opened will increase the book loading time.

@mwozny123
Copy link
Author

Yes, this file is used after device shutdown.
Original PB reader updates it, at loading or closing book (it doesn't matter),
yes, updating this just before shutdown should be fine.

@Frenzie
Copy link
Member

Frenzie commented Mar 8, 2018

@mk-f Any interest in this? It sounds fairly simple judging by what's been written here.

I came upon this due to https://www.mobileread.com/forums/showthread.php?t=295395

@mk-f
Copy link
Contributor

mk-f commented Mar 9, 2018

Sorry, i am preoccupied with work at the moment (and this is just cosmetics ;)).

Btw: If the problem is, that having another book-cover shown after shutdown (the one last opened by the PB-Reader) one can disable showing a book-cover on powerdown altogether in the PB-preferences.

@Frenzie
Copy link
Member

Frenzie commented Mar 9, 2018

Sounds like a good tip! :-)

@NiLuJe NiLuJe added the firmware label Jul 8, 2018
@LucyOne
Copy link

LucyOne commented Jul 26, 2019

Any news here? I would love to have this feature for my Pocketbook devices as I'm going to set KOReader as the default reader. Other readers can still be used via "open with", so the book covers from those events are still used.

@NiLuJe
Copy link
Member

NiLuJe commented Jul 26, 2019

We lack active developer(s) with PB devices, so, no news, no.

@mikkelnl
Copy link

Bump :) Though purely cosmetical/nice to have, I also would love this feature (have koreader export the book cover to the correct path so that Pocketbook can show it as screensaver/off state). If there's anything I can do to test, let me know.

@pazos pazos added the wontfix PR are welcomed label Aug 19, 2020
@pazos pazos closed this as completed Aug 19, 2020
@theboomr
Copy link

I know I'm necro-ing this thread, but is there any chance 4 years later that there is a developer who could implement this? I have a Pocketbook device nowadays and am extremely bothered by the power off image being a very old book cover lol.

I am a professional software engineer but probably lack the free time to be able to contribute something like this myself, despite that I would like to. That said, if there's a dev who could assist me in getting set up to do this myself then mayyybe I'd be able to do it.

@Frenzie
Copy link
Member

Frenzie commented Aug 16, 2024

The CoverImage plugin was added since (see plugins/coverimage) and anything written in here predates that, so I'm not sure if any of the above discussion is still relevant.

@theboomr
Copy link

Ah, yeah that makes sense. I guess what I'm looking for now is an ability for koreader to write the cover image to more than one place, since pocketbook has a sleep image as well as a power off image, and I would really like both to be set by koreader

@Frenzie
Copy link
Member

Frenzie commented Aug 16, 2024

It's probably better to open a new issue detailing a bit better how the sleep screen and/or coverimage plugin fail to meet some specific need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants