baskerville / plato

Document reader
Other
1.23k stars 102 forks source link

Setting book read state when downloading via hooks subsystem #337

Closed Church- closed 8 months ago

Church- commented 8 months ago

Hi there,

I'm currently working on modifying a plugin for grabbing books via OPDS.

Something I'd like to add to it is the ability to set the reading state of a book if the OPDS feed has that info/I can otherwise access it via API.

There are a number of books I keep on my e-reader for archival purposes that I'd like to automatically set as finished on download so they don't show up in my default search feed.

Correct me if I'm wrong but reading over the example code from the wallabag fetcher it seems like I'd just need to create a ReaderInfo json object as part of my info object before passing it via the addDocument event, no?

baskerville commented 8 months ago

Correct me if I'm wrong but reading over the example code from the wallabag fetcher it seems like I'd just need to create a ReaderInfo json object as part of my info object before passing it via the addDocument event, no?

I'm afraid it won't work : the reader field has the serde attribute skip set.

Church- commented 8 months ago

Bothersome, is there a way around that? Other then compiling a fork with the skip attribute changed to something more lax?

I assume I can't just use the _reader field ya?