View Single Post
Old 06-22-2011, 07:38 PM   #33
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
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.
  1. Plugin currently runs modally.
  2. It does not update any data in the calibre database but it does process multiple records (1-99) sequentially.
  3. I'm not aware of using a format() function.
  4. 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)
  5. The cover_path is only used for testing existence of a cover. It is not used to copy the cover from calibre to device.
  6. 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.
  7. 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?
jackie_w is offline   Reply With Quote