Otherwise calibre wil raise an error when its nil:
```
calibre, version 9.4.0
ERROR: Error: Error communicating with device
'uuid'
Traceback (most recent call last):
File "calibre/gui2/device.py", line 110, in run
File "calibre/gui2/device.py", line 581, in _books
File "calibre/devices/smart_device_app/driver.py", line 58, in _synchronizer
File "calibre/devices/smart_device_app/driver.py", line 1316, in books
KeyError: 'uuid'
```
When an OPDS catalog entry's URL resolves to a sub_table with only one
element, sub_table[2] returns nil, causing a crash on the subsequent
item.acquisitions access. Fall back to sub_table[1] when index 2 is nil.
Add a nil check on entry URL in getSyncDownloadList to prevent a
crash when a feed entry has no navigation link. Add a test for
single-quoted attribute feeds.
Add a CCLASS_SQUOTE character class and ST_ATTR_VAL_SQ state to the
lexer FSM so single-quoted attributes are parsed correctly without
cross-matching with double-quoted ones. Both quoting styles are valid
XML per the spec.
Due to the way this was wired, #14937 trigged BookStatusWidget:onSwitchFocus() when closing, which caused the review input dialog to pop right back up again.
But it doesn't look like you're actually supposed to be able to type in there at all, so I replaced it with a TextBoxWidget.
User can enable key-only access to enhance security,
useful when using public WiFi networks, and just a good rule
even for well-known or home networks.
The unescaped `.` in `".00"` matches any character followed by two
zeros. For a series entry like `"00001.00 | Title - Author"`, the
pattern matches `000` at position 1 instead of the intended literal
`.00` at position 6, producing `"01.00 | Title - Author"`.
Escape as `"%.00"` to match a literal period.
* refactor handling of faked event HoldRelease for text selection on NT, make sure we close the cycle properly so we don't get any byte drift when dealing with non-ascii characters.
Fix two bugs in the coverimage plugin:
1. cleanCache(): Fix operator precedence in while loop condition. In Lua,
`and` has higher precedence than `or`, so the bounds check `index <= #files`
was only applied to the cache size condition, not the file count condition.
Added parentheses to ensure the bounds check applies to both conditions.
2. getCacheFiles(): Use the function parameters `cache_path` and `cache_prefix`
consistently instead of mixing them with `self.cover_image_cache_path` and
`self.cover_image_cache_prefix`.
the firmware version of the PocketBook 623 does not provide NetMgrPing()
this leads to the application crashing after WiFi is activated and the
keepalive is scheduled
`self.re` isn't assigned until later in connect() (line 292), so at line
244 it is always nil — either never set, or cleared by a previous
disconnect(). This caused willRerunWhenConnected to receive nil as its
callback, so after Wi-Fi was brought up the coroutine was never resumed
and the Calibre connection silently died.
Use the local `re` (defined on line 234) which is the correct resume
callback for this coroutine.
Wikipedia recently started enforcing user agents to contain a contact
link. Without a contact, the request is subject to 429 errors when
requesting images.
* refactor onStopHighlightIndicator so it returns early
* stop text selection when opening menus or triggering hotkeys
* use self.ui.highlight (naturally)
* remove duplicated setDirty
Center the scaled cover image on both axes unconditionally instead
of branching on which dimension is the limiting factor. The branch
was susceptible to floating point rounding in math.floor causing
scaled_w to be 1 pixel less than s_w, flipping the alignment from
vertically centered to top-aligned depending on the cover's pixel
dimensions.
Fixes#14986.
* CoverImage: call iv2sh to update PocketBook startup logo on cover change
After the cover image file is written or reset, invoke PocketBook's
iv2sh WriteStartupLogo command so the device's boot logo is actually
updated. The command runs in the background to avoid blocking KOReader.
* CoverImage: use correct screen dimensions on PocketBook for boot logo
For PocketBook devices, Screen:getWidth/getHeight returns
dimensions that iv2sh will not accept. In that case, we should call
Screen:getScreenWidth and Screen:getScreenHeight instead so the
generated boot logo has the correct size.
We may happen to have an empty selection while panning,
no reason to abort the selection yet before release.
Also add get_segments=true to remaining calls to
getScreenBoxesFromPositions() that we forgot to
update to use it.
Includes:
- Add support for CSS width: fit-content
- fb2def.h: add a few common attributes
- lvtext: includes src->t.offset in word->t.start
- CSS: support for pseudo element ::first-letter
- ::first-letter: fix when single letter text node
- ldomXPointer::getRectEx(): return optional context
- ldomXRange::getSegmentRects(): fix when BiDi/RTL
- testAuthorDotTitleFormat: fix off-by-one error
- Epub ncx TOC: don't skip items with invalid href
- Avoid some compiler warnings
- ldomDocument::createXPointer(pt): better consistency
- CSS: add support for "ruby-position: over/under/alternate"
- MathML: don't handle anything when no def style set
cre.cpp:
- add requestRender()
- getTextFromPositions(): improvements
base:
- Fix offs_x/offs_y typo in BB_add_blit_from fast path
- lua-Spore: fix matching plain application/json
- libpng: update to 1.6.55
- luajit: update to 2.1.1770989063
- ci/circle: bump docker images