H-e-e-l-l-p-p! Most of this thread is completely over my head but the keyword
cover(), from post #1 has made me reply rather than go get my duvet and sit under it singing la-la-lah-la-lah until it's all over
I have no idea whether my cosmetic Copy Cover plugin will be affected by your plans and I don't run from source to suck-it-and-see.
Please can someone help me figure out whether I need to do anything? I think the following info may be relevant.
- Plugin currently runs modally.
- It does not update any data in the calibre database but it does process multiple records (1-99) sequentially.
- I'm not aware of using a format() function.
- I'm not exactly sure what you mean by the cover() function but I do use the following code:
Code:
db = self.gui.library_view.model().db
cover_path = db.cover(row, index_is_id=False, as_path=True)
cover_data = db.cover(row, index_is_id=False, as_path=False)
- The cover_path is only used for testing existence of a cover. It is not used to copy the cover from calibre to device.
- Instead, the cover_data is used, in one of 2 ways depending on attached device:
- - directly, using calibre function save_cover_data_to from calibre.utils.magick.draw
- - indirectly by using an instance of the Image() class from calibre.utils.magick to load the cover_data followed by certain actions with the Image methods size and quantize. Image instance is then copied to device using save_cover_data_to.
- I use os.path quite a lot but (I think) always referring to files/folders on the device rather than in calibre. I can check more carefully if necessary.
Now, do I need to get the duvet?