Skip to content

OPDS: group downloading#13338

Merged
hius07 merged 6 commits into
koreader:masterfrom
hius07:opds-group
Mar 2, 2025
Merged

OPDS: group downloading#13338
hius07 merged 6 commits into
koreader:masterfrom
hius07:opds-group

Conversation

@hius07

@hius07 hius07 commented Feb 28, 2025

Copy link
Copy Markdown
Member

(1) Remove redundant OPDScatalog module.

(2) Move OPDS settings from settings.reader.lua to settings/opds.lua.

(3) Add group downloading. Closes #10635.
A book can be added to the download list by long-pressing on a file-type button in the download dialog.
Download list is the upper item in the OPDS catalog.

1

2

Popup dialog on tapping a book:

3


This change is Reviewable

@hius07 hius07 merged commit daeacef into koreader:master Mar 2, 2025
@hius07 hius07 deleted the opds-group branch March 2, 2025 09:22
@hius07 hius07 added this to the 2025.02 milestone Mar 2, 2025
@boypt

boypt commented Mar 17, 2025

Copy link
Copy Markdown

I found a crash introduced by this PR:

CRASH

./luajit: plugins/opds.koplugin/opdsbrowser.lua:1062: invalid value (boolean) at index 20 in table for 'concat'
stack traceback:
        [C]: in function 'concat'
        plugins/opds.koplugin/opdsbrowser.lua:1062: in function 'onMenuSelect'
        frontend/ui/widget/menu.lua:531: in function 'handleEvent'
        frontend/ui/widget/container/inputcontainer.lua:266: in function 'handleEvent'
        frontend/ui/widget/container/widgetcontainer.lua:83: in function 'propagateEvent'
        frontend/ui/widget/container/widgetcontainer.lua:101: in function 'handleEvent'
        frontend/ui/widget/container/widgetcontainer.lua:83: in function 'propagateEvent'
        frontend/ui/widget/container/widgetcontainer.lua:101: in function 'handleEvent'
        frontend/ui/widget/container/widgetcontainer.lua:83: in function 'propagateEvent'
        frontend/ui/widget/container/widgetcontainer.lua:101: in function 'handleEvent'
        frontend/ui/widget/container/widgetcontainer.lua:83: in function 'propagateEvent'
        frontend/ui/widget/container/widgetcontainer.lua:101: in function 'handleEvent'
        frontend/ui/widget/container/widgetcontainer.lua:83: in function 'propagateEvent'
        frontend/ui/widget/container/widgetcontainer.lua:101: in function 'handleEvent'
        frontend/ui/uimanager.lua:896: in function 'sendEvent'
        frontend/ui/uimanager.lua:53: in function '__default__'
        frontend/ui/uimanager.lua:1423: in function 'handleInputEvent'
        frontend/ui/uimanager.lua:1523: in function 'handleInput'
        frontend/ui/uimanager.lua:1567: in function 'run'
        ./reader.lua:280: in main chunk
        [C]: at 0x00013e71
!!!!
Uh oh, something went awry... (Crash n°1: 03/17/25 @ 13:16:11)
Running FW 4.38.23171 on Linux 3.0.35+ (#6008 PREEMPT Tue Mar 30 14:46:54 CST 2021)
Attempting to restart KOReader . . .
!!!!

Code

Cause by the last parameter: dl_item.info, where the book doesn't contain info, dl_item.info is a boolean (false, I presume).

https://github.com/hius07/koreader/blob/d412dd2fba366ae8c4d0a762b6a599bbccfdcd01/plugins/opds.koplugin/opdsbrowser.lua#L1062-L1070

How to reproduce:

  1. add books to OPDS group download, which doesn't contain description info.
  2. click to OPDS Download list, click the book
  3. crash happeded.

@hius07

hius07 commented Mar 17, 2025

Copy link
Copy Markdown
Member Author

Thanks.

@ReaLx3m

ReaLx3m commented Apr 11, 2025

Copy link
Copy Markdown

Nice addition to the OPDS functionality, liking the direction.
Do you think it would be possible for an option to download a whole folder to be added?

@hius07

hius07 commented Apr 11, 2025

Copy link
Copy Markdown
Member Author

Usually there is no such thing like "whole folder", OPDS servers give items partially, providing a link to the next portion.
https://specs.opds.io/opds-1.2.html#24-listing-acquisition-feeds
https://datatracker.ietf.org/doc/html/rfc5005#section-3

Besides, as you can see in the download popup dialog, a book has different formats, that is why we need to show this dialog to choose a format to be added to the download list.

@ReaLx3m

ReaLx3m commented Apr 11, 2025

Copy link
Copy Markdown

I see. Too bad, but it is what it is. Either way thanks for making it more usable by adding the group downloading option.
I suppose the FTP client should work with folders as a workaround right?

0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Download multiple books from opds

4 participants