40118 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
72f403d52a
Fix regression: EPUB annotations not saved due to immediate queue shutdown
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/171c5cc8-db33-468a-9656-d88b8b95ff40

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-08 13:39:27 +00:00
Kovid Goyal
fa2cce533d
pep8 2026-04-08 08:26:33 +05:30
Kovid Goyal
089dad329a
AI: Make the GitHub backend a bit more robust
Fixes #2147495 [Github backend errors silently](https://bugs.launchpad.net/calibre/+bug/2147495)
2026-04-08 08:25:53 +05:30
Kovid Goyal
4242c5c30b
Viewer: have the native pinch act exactly the touch screen pinch
Now only on completing the gesture does the font size change.
2026-04-07 19:28:38 +05:30
Kovid Goyal
3013076808
E-book viewer: Handle native pinch to zoom gesture to change font size and persist the changes using the same mechanism as regular font size adjustment 2026-04-07 15:37:30 +05:30
Kovid Goyal
9f0bf3a685
Remove unused code 2026-04-07 14:43:33 +05:30
Kovid Goyal
24a7abd0af
Be a bit more robust against external software corrupting calnotes 2026-04-07 07:07:00 +05:30
adar2378
927744673e Fix ValueError in remove_namespaces when tag name contains colon
When an EPUB contains elements with custom namespace prefixes (e.g.
<vita:metadata>), the remove_namespaces method in the KF8 writer
crashes with `ValueError: Invalid tag name 'vita:'`.

The existing except ValueError block only strips colons from attribute
names but does not handle the tag name itself. This causes the second
makeelement call to raise the same ValueError.

Fix: replace colons with hyphens in the tag name before retrying,
consistent with how colon-containing attributes are already handled.
2026-04-05 22:31:26 +06:00
Kovid Goyal
ee3166cc5b
Fix status tip for context menus not working 2026-04-05 10:26:28 +05:30
Kovid Goyal
89b907546f
clone action should also copy status tip 2026-04-05 10:14:13 +05:30
Kovid Goyal
f8df3d90db
Add status tips to copy to library actions 2026-04-05 10:01:18 +05:30
Kovid Goyal
bd4d9390bc
Content server: Fix regression causing error during searching. Fixes #2147261 [Search fucntion in calibre server 9.6.0 (search in epub-File) fails, works in 9.3.0](https://bugs.launchpad.net/calibre/+bug/2147261) 2026-04-05 09:40:56 +05:30
ktetzlaff
e0324c7ae8 Fix opening a book from the FTS search result dialog
Since version 9.6.0, pressing `v` in the FTS search result pane results in
the following error:

```
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/fts/dialog.py", line 32, in view_current_book
    if not self.results_panel.view_current_result():
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/calibre/calibre/gui2/fts/search.py", line 1062, in view_current_result
    open_book(results, match)
    ~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/lib/calibre/calibre/gui2/fts/search.py", line 115, in open_book
    result_dict = results.result_dicts[match_index]
                  ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TypeError: list indices must be integers or slices, not dict
```

I traced this back to commit b10e56d9e5 (Refactor FTS dialog to allow multiple
result visualisations) which refactored `ResultsView.view_current_result` in
`src/calibre/gui2/fts/search.py` from:

``` python
    def view_current_result(self):
        idx = self.currentIndex()
        if idx.isValid():
            results, match = self.m.data_for_index(idx)
            if results:
                if match is not None:
                    match = idx.row()
                open_book(results, match)
                return True
        return False
```

to `ResultsPanel.view_current_result`:

``` python
    def view_current_result(self):
        results, match = self.current_view.current_result()
        if results:
            open_book(results, match)
            return True
        return False
```

and `SplitView.current_result`:

``` python
    def current_result(self):
        idx = self.results_view.currentIndex()
        if idx.isValid():
            results, match = self.results_view.model().data_for_index(idx)
            if match is None:
                match = idx.row()
            return results, match
        return None, None
```

As can be seen in the latter, the condition in the original
`ResultsView.view_current_result`:

``` python
           if match is not None:
                match = idx.row()
```

has changed to:

``` python
           if match is None:
                match = idx.row()
```

in `SplitView.current_result` which is causing the error.

This bug is fixed in the current commit.
2026-04-04 13:55:22 +02:00
Kovid Goyal
cef0b976a1
Annots browser: Fix searching with restriction to type of annotation not working 2026-04-04 09:15:26 +05:30
Kovid Goyal
fa89d52271
Bump version for preview release 2026-04-03 08:42:43 +05:30
Kovid Goyal
9e05bb1f69
Merge branch 'master' of https://github.com/sgmoore/calibre 2026-04-02 20:27:56 +05:30
Stephen Moore
991e719315 Amended WorkerError custom exception to print all details.
Printing standard tracebacks now includes the original exception.
2026-04-02 15:31:22 +01:00
Kovid Goyal
ae0121f210
Fix #2147008 [Openrouter backend - reasoning disabled if set to auto](https://bugs.launchpad.net/calibre/+bug/2147008) 2026-04-01 19:24:26 +05:30
copilot-swe-agent[bot]
55e070682c Fix duplicate column names in Show Column and Sort By menus
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/bdadbc3e-805b-48aa-9232-a4c7df75d643

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-04-01 05:28:50 +00:00
Gabriel Russell
ca598395d5 fixing a couple of use-after-free bugs in libmtp.c
o my kindle colorsoft has a ton of books on it, so I'm guessing
  that that is why this crashed popped up.
o there were cases in this file of doing the memory clean up safely,
  so I just copied how it was done there.
2026-03-31 14:55:12 -04:00
Kovid Goyal
6c9ecc6139
Fix search error report dialog being hidden automatically 2026-03-31 23:51:31 +05:30
copilot-swe-agent[bot]
6b0d315653
Content server: Fix opening results from full text search not working. Fixes #2146829
Fixes #3075
2026-03-31 23:46:48 +05:30
Kovid Goyal
3155ae770c
... 2026-03-31 23:05:17 +05:30
copilot-swe-agent[bot]
38252f6435 Fix test_annotations tests to match updated annotation group sorting
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/2fb2b51f-720c-42c9-b99a-bbcadf6bd521

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-31 10:21:37 +00:00
copilot-swe-agent[bot]
e7bd5ee3e7 Use rating_to_stars for rating group labels, 'Unrated' for missing/0 values
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/484081a7-d0c9-44da-aabb-4b2e454dc774

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-31 09:34:54 +00:00
copilot-swe-agent[bot]
2a4f8570cd Fix type mismatch in get_group_key for non-text fields (rating, enumeration, etc.)
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/390a940b-78a4-4b27-a1e4-0728a442235e

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-31 09:29:26 +00:00
Kovid Goyal
08a0a9a396
Partial cleanup of previous PR 2026-03-31 14:54:33 +05:30
copilot-swe-agent[bot]
f4e5b0f4e5 Merge remote-tracking branch 'origin/master' into copilot/refactor-grouping-code-annotations
# Conflicts:
#	src/calibre/gui2/library/test_annotations.py

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-31 08:39:09 +00:00
copilot-swe-agent[bot]
e2a51c3409 Address code review: simplify walrus operator, fix test assertion
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/6c6c56e2-ea78-4bc2-95b1-4ee08f08c1dd

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-31 08:29:02 +00:00
copilot-swe-agent[bot]
ccd7d3ffc8 Refactor grouping code in annotations.py - use db prefs, iter_all_groups, and multi-valued field support
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/6c6c56e2-ea78-4bc2-95b1-4ee08f08c1dd

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-31 08:27:37 +00:00
Kovid Goyal
5413476893
Fix failing tests 2026-03-31 13:53:46 +05:30
Kovid Goyal
bf1b8f18b4
Make getting list of groups re-useable 2026-03-31 13:22:58 +05:30
Kovid Goyal
ae60d09500
Clean up previous PR 2026-03-31 12:46:31 +05:30
Kovid Goyal
1777d6288a
pep8 2026-03-31 10:17:17 +05:30
Kovid Goyal
81ea2dcc55
Merge branch 'annot-sort' of https://github.com/brpeterman/calibre 2026-03-31 10:15:39 +05:30
copilot-swe-agent[bot]
85429c25de Fix cover not being set when adding files to existing book records with no cover
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/aa4abbc0-5dd8-4380-a760-ace343a70589

Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
2026-03-31 04:20:43 +00:00
Kovid Goyal
65cc790bf7
Content server: Implement full offline mode
Needs HTTPS to work because browsers are gods own pieces off ass.
Fixes #3065 (E-book viewer: Service Worker offline caching)
2026-03-29 21:33:19 +05:30
Kovid Goyal
7ecc18e7eb
... 2026-03-29 21:22:04 +05:30
Kovid Goyal
564d83535c
... 2026-03-29 13:34:25 +05:30
Kovid Goyal
ca6fa6bccf
Make building index-generated.html deterministic 2026-03-29 10:56:59 +05:30
Kovid Goyal
94d93c2165
Conversion: Ignore page break CSS properties using the value "never"
This is invalid, but there apparently exist some books in the wild that
use it. Sigh. See #2146609 (*LOTS* of undesired splits on EPUB to AZW3 conversion)
2026-03-29 07:46:19 +05:30
Kovid Goyal
af489dc784
Fix #2146596 [Bug in FTS mark_books: AttributeError: 'ResultsPanel' object has no attribute 'results_view' (v9.6)](https://bugs.launchpad.net/calibre/+bug/2146596) 2026-03-28 06:14:09 +05:30
Brandon
4d9c482491
Merge branch 'kovidgoyal:master' into annot-sort 2026-03-27 12:45:37 -05:00
Brandon Peterman
eb97e8c3e6 Annots browser: Refactor grouping to better match existing patterns 2026-03-27 12:45:05 -05:00
Kovid Goyal
f8cf906be4
version 9.6.0 2026-03-27 08:38:17 +05:30
Kovid Goyal
a0b8337305
Cleanup previous PR 2026-03-26 16:42:01 +05:30
un-pogaz
56544fd826 add tweak extra_word_break_chars to completion mode 2026-03-26 09:58:51 +01:00
Kovid Goyal
ce7a4bb490
Cleanup previous PR
Fixes #2146404 [Changing lookup name clears all custom notes](https://bugs.launchpad.net/calibre/+bug/2146404)
2026-03-26 08:30:26 +05:30
copilot-swe-agent[bot]
fcd1a00660 Handle column deletion notes cleanup and add rename/delete tests
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/5be45f66-584e-4aa4-9598-3ef2020d7fef
2026-03-26 02:50:43 +00:00
copilot-swe-agent[bot]
58275cb151 Fix notes loss when changing custom column lookup name
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com>
Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/9a307edd-abb8-421b-a419-6d8f435a0148
2026-03-26 02:28:16 +00:00