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.
|