Kobo v5 support#11
Conversation
| } | ||
|
|
||
| if (thumbnails_count == 0U) { | ||
| char converted_book_path[CFG_SZ_MAX + 7]; |
There was a problem hiding this comment.
KFMON_PATH_MAX (or, I guess sizeof(thumbnail_path), even)
There was a problem hiding this comment.
Well, I followed the definition of book_path which gets copied into this.
There was a problem hiding this comment.
Which was a sensible decision ^^.
Or I guess another approach would just be to replace in-place, since it's only going to be 1:1 replacements?
Ooh, which raises a new question: does Nickel also do a byte-for-byte replacement, or does it do a per-codepoint replacement for multibyte glyphs?
There was a problem hiding this comment.
file:///mnt/onboard/Books/The Will to Change_ Men, Masculinity, and Love -- bell hoo►ks -- 20$04 -- A§tria Booöküs -- 0743480333 -- fa╚8.epub
becomes
file____mnt_onboard_Books_The_Will_to_Change__Men,_Masculinity,_and_Love_--_bell_hoo►ks_--_20$04_--_A§tria_Booöküs_--_0743480333_--_fa╚8_epub
The file system mounts with CP437 for me, afaik there is no multi byte characters in a fat filename, so that should not be an issue. I'll check your list of characters again, but it seems everything else is just fine.
| is_processed = true; | ||
| } | ||
|
|
||
| if (thumbnails_count == 0U) { |
There was a problem hiding this comment.
I'd probably make the whole thing branch on whether we're actually running on v5 or not to avoid mixing this with the v3/v4 codepath ;).
There was a problem hiding this comment.
I see your point but I don't see a downside on the mixed approach, as it seems we don't need to clearly identify a v5 (yet). Otherwise, would do that earlier in Code...
There was a problem hiding this comment.
Fair enough. For future reference, does /mnt/onboard/.kobo/version still exist?
There was a problem hiding this comment.
root@ereader:~# cat /mnt/onboard/.kobo/version
T302NNNNNNNNN,4.9.77,5.2.190625,4.9.77,4.9.77,00000000-0000-0000-0000-000000000691
(queried via ssh :D )
| { | ||
| for (size_t i = 0; i < length; i++) { | ||
| unsigned char c = str[i]; | ||
| if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == ',') || (c == '-') || (c == '&') || (c == '?') || (c == 0) || (c >= '0' && c <= '9')) { |
There was a problem hiding this comment.
That seems different than the list of illegal FAT32 chars. Was that from empirical evidence or just something to quickly start with?
There was a problem hiding this comment.
It sure helps when I actually read your first post, lol. Never mind me ;p.
There was a problem hiding this comment.
For reference, said list is NUL " * / : < > ? \ | (according to https://en.wikipedia.org/wiki/Comparison_of_file_systems)
pkill will also kill the kfmon-uninstall.sh script - quite unfortunate...
|
I added a new kobov5 Makefile target to generate the update zip files for install and uninstall. I also replaced pkill by killall - I hope that's not a problem? As I kept the filename of the uninstaller script |
|
KFMon-.zip Here are my builds of this branch, is anybody wants to try out :-) |
Oh, good point ;p. Nah, should be fine, we only really wanted to kill the actual daemon there. |
|
Thanks! (I may tweak a few things, so I might ping you to double-check I didn't break anything ;)). |
|
There, pushed a few things, hopefully I didn't break anything ^^. |
|
I updated to your master branch - it's working fine! thanks for tidying up - I lack a bit of practice there... |
|
No worries, thanks for being willing to work on this and test it in the first place ;). |
This adds a change to support Kobo v5 thumbnails, it also adds an init script to start kfmon on boot.
It still misses the tooling to generate an update.tar as there might be some more testing neccessary anyway.
ToDos
This change is