08-16-2024, 10:18 AM | #1 |
Groupie
Posts: 185
Karma: 194590
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
koreader as default for every epub except those from .acsm
I like koreader, so my /mnt/ext1/system/config/extensions.cfg is very partial to it. However I also borrow DRM books from libraries, so I get .acsm. When I tap the acsm file icon on the home screen, or the entry in the librarian, the content is downloaded, the acsm file is deleted and the reader goes on opening the resulting epub. As expected, but since extensions.cfg says
Code:
epub:@EPUB_file:1:koreader.app,eink-reader.app:ICON_EPUB Is anyone aware of any trick I could play for triggering pbreader only on epubs coming from acsm downloads, while leaving koreader as preferred default for all others? Last edited by EastEriq; 08-16-2024 at 10:32 AM. |
08-16-2024, 12:56 PM | #2 |
Connoisseur
Posts: 65
Karma: 388296
Join Date: Aug 2022
Location: USA
Device: Pocketbook Inkpad Color 3
|
I have the same issue, so I simply unassigned KOReader from ePubs and open them from the KOReader itself. You can assign a key to switch between the applications — it's helpful after downloading new books via Send to Pocketbook feature.
|
Advert | |
|
08-16-2024, 02:58 PM | #3 |
Resident Curmudgeon
Posts: 76,495
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Thread belongs in the KOReader forum.
|
08-17-2024, 02:55 PM | #4 | |
Groupie
Posts: 185
Karma: 194590
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
Quote:
|
|
08-17-2024, 02:57 PM | #5 |
Groupie
Posts: 185
Karma: 194590
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
|
Advert | |
|
08-17-2024, 03:44 PM | #6 |
0000000000101010
Posts: 5,740
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Interesting problem. What directory is the epub file that the acsm generates downloaded to?
|
08-17-2024, 05:15 PM | #7 |
Groupie
Posts: 185
Karma: 194590
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
The final epub goes in the same directory where the acsm file is, before it's deleted. IIRC sometimes you can see the librarian updating the percentage of the download in progress on the icon of the newly created epub, which would give the impression that no intermediate temporary file is involved, but I can't really tell, it may be just an animation. Then you see the librarian changing the file name with the book title and rendering the cover image, before the default reading program opens.
|
08-17-2024, 05:35 PM | #8 | |
0000000000101010
Posts: 5,740
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Quote:
What is the process for acquiring the acsm files on your pocketbook? |
|
08-17-2024, 05:50 PM | #9 | ||
Groupie
Posts: 185
Karma: 194590
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
Quote:
Quote:
Last edited by EastEriq; 11-10-2024 at 07:04 AM. Reason: corrected -- the OS downloads acsm in Digital Editions/, not in thefolder of acsm |
||
08-17-2024, 06:03 PM | #10 | |
0000000000101010
Posts: 5,740
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Quote:
I was thinking a few lines of code at the start of the koreader launcher file in /mnt/ext1/system/bin/koreader.app may suffice. Run the check, if the check matches the dedicated directory we write to handlers.cfg and exit without launching koreader. You'd then have to click on the book a second time for it to launch with PBreader. If the check does not match the dedicated directory, no writing to handlers.cfg and Koreader launches the epub as usual. Last edited by neil_swann80; 11-12-2024 at 02:32 PM. |
|
08-18-2024, 03:40 AM | #11 |
0000000000101010
Posts: 5,740
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Try using this custom version of /mnt/ext1/system/bin/koreader.app:
Code:
#!/bin/sh bookDir=$(dirname "$1") openWith="/mnt/ext1/system/config/handlers.cfg" if [ "$bookDir" == "/mnt/ext1/Digital Editions" ]; then echo "${1}:eink-reader.app" >> $openWith exec /ebrmain/cramfs/bin/eink-reader.app "$1" else exec /mnt/ext1/applications/koreader.app "$@" fi exit Last edited by neil_swann80; 11-09-2024 at 07:03 AM. |
08-18-2024, 06:04 AM | #12 |
Groupie
Posts: 185
Karma: 194590
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
Thanks, I will check it in due time, I'm on the move today.
Another idea I had is that if there was a small application capable of determining whether the epub is DRMed or not, that one could be set as the default opener, in a script which then calls either eink-reader or koreader depending on the result. Still another one is that koreader does detect that an epub is DRMd (because it reports it), so a user patch cold be that it closes itself launching eink-reader instead. |
08-18-2024, 07:08 AM | #13 | ||
0000000000101010
Posts: 5,740
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Quote:
Quote:
If you make any progress please post it here, I'd be interested to see your approach. |
||
09-25-2024, 04:33 PM | #14 |
Groupie
Posts: 185
Karma: 194590
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
I've not forgotten this one, but I haven't advanced much either.
In principle I would have staid away form patching /mnt/ext1/applications/koreader.app or /mnt/ext1/system/bin/koreader.app, on the ground that OTA might overwrite them, so I thought of finding out what happens when the system deals with an .acsm. On my device there is no hope anymore that the firmware gets an OTA update, so in a way that would be more permanent. In a crude way, I tried to identify what is launched when clicking on a .acsm by ssh'ing into the device, typing Code:
P=""; while [ 1 ]; do P1=$P; P="`ps | tail -6 | head -1`"; if [ "$P" != "$P1" ]; then echo "$P"; fi; done Code:
17385 sreader 62912 S < /ebrmain/bin/acsm_fulfill.app 19319 sreader 0 Z < [acsm_fulfill.ap] 19320 sreader 53176 R < /ebrmain/bin/adobescanner.app /mnt/ext1/Digital Editions/Thirteen Moons.epub 0 0 -metadata 19496 reader 46060 S < /ebrmain/bin/new_task.app /mnt/ext1/system/bin/koreader.app koreader.app Thirteen Moons.epub 128 /mnt/ext1/system/bin/koreader.app /mnt/ext1/Digit 19512 reader 1568 S < {koreader.app} /bin/sh /mnt/ext1/system/bin/koreader.app /mnt/ext1/Digital Editions/Thirteen Moons.epub 19544 reader 4288 R < {reader.lua} ./luajit ./reader.lua /mnt/ext1/Digital Editions/Thirteen Moons.epub Having seen that, though, I'm a bit out of ideas. /ebrmain/bin/acsm_fulfill.app, /ebrmain/bin/adobescanner.app and /ebrmain/bin/new_task.app are all compiled binaries. `strings` can show interesting things about them, but nothing which gave me clues. Only the latter called without arguments says Code:
# /ebrmain/bin/new_task.app Usage: new_task.app path appname name flags Last edited by EastEriq; 09-25-2024 at 04:42 PM. |
09-25-2024, 05:11 PM | #15 |
Groupie
Posts: 185
Karma: 194590
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
Miscellaneous observations:
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
KOreader as default on Boox Poke 3 | Waylander | KOReader | 4 | 05-22-2021 06:09 PM |
Plato or Koreader by default | stiivo | Kobo Reader | 3 | 07-28-2020 03:39 PM |
eBooks use epub so why am I getting an acsm file? | Atomised | Conversion | 9 | 05-30-2018 05:51 PM |
epub and ocsm (NOT acsm) | clemens14 | ePub | 0 | 12-26-2015 04:07 PM |
How long between dowloading the .acsm and downloading epub? | Mad_Max | ePub | 0 | 01-07-2011 03:18 PM |