View Single Post
Old 09-07-2022, 06:29 PM   #765
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version

2022-08-30
- Move where GC puts temporary files during setting Import/Export to plugins/generate_cover instead of resources/images/generate_cover.
- Include file name when warning about image file overwrite.

It would be better if GC used a proper temp file, but the JSONConfig class it uses insists on something relative to the calibre settings dir.

Also includes:
Quote:
Originally Posted by JimmXinu View Post
New Test Version

2022-08-30
- Move where GC stores cover images from resources/images/generate_cover to plugins/generate_cover

Attached version uses the new dir and does a one-time copy(not move) of configured images from resources/images/generate_cover to plugins/generate_cover.

Tested with Calibre 2, 5 & 6, but only on Win10. I don't have mac or linux available to test with right now. I did try to use a cross-platform safe method.
IMPORTANT NOTE

This version still contains a rather obscure bug I can't figure out.
  1. Create a new setting
  2. Give it a name
  3. Change which image it uses
  4. Click Save
  5. Cancel out of GC without applying the setting
  6. Open GC again

Then I get a 'Corrupted Config file' warning:
Quote:
calibre, version 6.4.0
ERROR: Corrupted Configuration File: <p>Your configuration file was corrupted (see Details).</p>)<p>Please report your exact recent actions which led to this on the MobileRead forum thread for this plugin so it can be fixed.</p><p>The configuration has been fixed automatically.</p>

Corrupted setting: "Stacked Books" has incorrect internal name of: "asdf"
After it's 'autocorrected' the config, the previously selected setting that I copied for the new one also has it's image changed.

Last edited by JimmXinu; 09-08-2022 at 01:07 PM. Reason: Remove obsolete test version
JimmXinu is offline   Reply With Quote