View Single Post
Old 06-07-2020, 02:11 PM   #1
pazos
cosiņeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
Derive full path of a book from device driver + lpath

background

I'm trying to improve a bit KOReader integration with calibre metadata.
KOReader supports some platforms that have a dedicated calibre driver (kobos, kindles, pocketbooks, bq cervantes, android).

problem

Need to figure out the full path of each book based on its lpath

more info

With certain calibre drivers (kobo, connect to folder, smart app device...) I can derive the full path of a book by joining the path of metadata files and the lpath of each book (as stored in {.}metadata.calibre).

In other drivers the path where calibre stores the books differs from the path where calibre stores the metadata. This happens, for example, on the BQ Cervantes driver, which stores metadata.calibre and driveinfo.calibre on the root of the USB share and books under the relative path books/

In these cases there's no way to derive the full path of a book by joining library path + book lpath as books don't store that part of the path as their lpath.

question

I would like to know if there's some string in driveinfo.calibre that I can use to determine if the driver places the book somewhere else.
pazos is offline   Reply With Quote