Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 06-08-2026, 02:28 AM   #1
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 75,718
Karma: 320245586
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Modification field on OPDS Feed

I'm using calibre server with justRead.app, which is mostly working great.

However, justRead.app uses the Modification field in the OPDS feed to tell whether a book file has been updated and needs to be re-downloaded.

Unfortunately the calibre server's OPDS Modification field is taken from the database entry Modification field, which is changed by ANY change to the metadata of the book, and sometimes even by purely display changes. E.g. Just changing the display formatting of a Progress column to include a % sign at the end of the number results in ALL books in calibre having an updated Modification date.

Downloading several thousand books again just because I've changed the way a column is displayed in calibre is not optimal.

It would be really nice if the OPDS feed provided some way for clients to tell whether the book file that would be downloaded has changed from the last time the client downloaded the book.

I don't know about the internal details of the OPDS format, but would it be possible, for instance, to add in a hash of the book that's available for download?
pdurrant is offline   Reply With Quote
Old 06-08-2026, 02:49 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,308
Karma: 29630860
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
IIRC calibre OPDS acquisition feeds include fie length and mtime as attributes.
For example:
Code:
<link type="application/x-mobi8-ebook" href="/get/azw3/1356/test_library" rel="http://opds-spec.org/acquisition" length="3354704" mtime="2023-11-18T02:16:51+00:00"/>
    <link type="application/vnd.openxmlformats-officedocument.wordprocessingml.document" href="/get/docx/1356/test_library" rel="http://opds-spec.org/acquisition" length="3039862" mtime="2023-11-18T02:16:51+00:00"/>
    <link type="application/epub+zip" href="/get/epub/1356/test_library" rel="http://opds-spec.org/acquisition" length="2657477" mtime="2023-11-18T02:16:51+00:00"/>
kovidgoyal is offline   Reply With Quote
Old 06-08-2026, 12:03 PM   #3
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 75,718
Karma: 320245586
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
I think I've misunderstood which mechanism justRead.app uses. It uses "calibre specific rest API in JSON format."
pdurrant is offline   Reply With Quote
Old 06-08-2026, 12:15 PM   #4
petrjahoda
Evangelist
petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.
 
Posts: 413
Karma: 567890
Join Date: Dec 2025
Location: Czech Republic
Device: iphone, ipad
Hi Kovid, justRead's developer here.

One correction to Paul: this isn't about accessing Calibre via OPDS, justRead connects through the Calibre Content Server API.

To explain what's happening: justRead reads each book's last_modified field from /ajax/books/{library} and compares it against the value stored from the previous sync. That comparison drives a per-book status that lets the user decide what to transfer:
- New: no stored last_modified on the justRead side yet
- Changed: the stored last_modified differs from the server's current value
- Unchanged: both values match (these are not displayed at all, no need to)

The Calibre action Paul described above rewrites last_modified on every book and from that point, every book's timestamp differs from what justRead stored, so they all get marked as Changed, even though their contents didn't actually change.
petrjahoda is online now   Reply With Quote
Old 06-08-2026, 01:55 PM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 52,414
Karma: 180944990
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I ran into a similar problem a while back and found my solution in the Job Spy plugin where the only function I still use is under GUI tools that are metadata related => Set last-modified date to date-added.
DNSB is offline   Reply With Quote
Old 06-08-2026, 09:15 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,308
Karma: 29630860
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
last_modified is not about format modification times, never has been nor ever will be. If you want format modification times to drive modification status you will need to actually load those and read them, not last_modified.
kovidgoyal is offline   Reply With Quote
Old 06-09-2026, 01:32 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,308
Karma: 29630860
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And to make it easier I have added mtimes for individual formats to book metadata https://github.com/kovidgoyal/calibr...19be0e5b878391
kovidgoyal is offline   Reply With Quote
Old 06-09-2026, 02:07 AM   #8
petrjahoda
Evangelist
petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.
 
Posts: 413
Karma: 567890
Join Date: Dec 2025
Location: Czech Republic
Device: iphone, ipad
Hi Kovid, thank you for it, so I will use mtime for this. I thought last_modified was for last modified time, by the name of the parameter.

And now I am curious: if last_modified is not last modified datetime, what datetime is it then? What is its purpose in the data?
petrjahoda is online now   Reply With Quote
Old 06-09-2026, 03:15 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 46,308
Karma: 29630860
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Its the last time *any metadata* associated with the book was modified.
kovidgoyal is offline   Reply With Quote
Old 06-09-2026, 08:19 AM   #10
petrjahoda
Evangelist
petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.petrjahoda ought to be getting tired of karma fortunes by now.
 
Posts: 413
Karma: 567890
Join Date: Dec 2025
Location: Czech Republic
Device: iphone, ipad
Thank you very much, will use mtimes and last_modified as backup.
petrjahoda is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual library and opds feed Calan Server 5 08-02-2024 11:30 AM
Date in OPDS Feed thomasmorus Devices 2 09-13-2016 02:12 PM
OPDS Content Server to provide last modification date cedhax Related Tools 9 09-13-2016 07:11 AM
support for content in OPDS feed At_Libitum Marvin 3 11-01-2013 07:11 PM
Hierachical tags in opds feed At_Libitum Calibre 2 10-09-2013 04:52 AM


All times are GMT -4. The time now is 03:53 PM.


MobileRead.com is a privately owned, operated and funded community.