Metadata source plugin, when the thread passes each book to the Identify function. It only seems to pass the title, author and identifiers. I was wondering if there is a helper function to retrieve the current ebook paths for the current title being identified?
Or would I have to do a DB search, something like:
SELECT * FROM books LEFT JOIN data ON books.id = data.book WHERE books.title LIKE "'+ title +'%" AND (data.format = "PDF" OR data.format = "EPUB")
so I could retrieve the PDF and EPUB paths for the current title?
Then, looking at the DB, it only has the path without the Calibre Library location, so I would have to write the path back together using something like:
book_path = book_path.replace('/', os.sep) + os.sep + book_title + "." + str(file_format).lower
But then, still, it would be missing the Calibre library location.
Just seems a bit long-winded if there were a helper function to retrieve this information, it would be perfect.
Last edited by mitsie; 06-04-2025 at 04:25 AM.
|