1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-26 16:41:29 +02:00

Changed location of scanned fonts.

In Calibre, there was decided to keep the fonts information inside the
configuration directory. While scanned fonts information is actually a
cache, I would keep it there. This commit is making that happen.

Also removed XMLConfig in favor of JSONConfig class, since XMLConfig is
not used at all.
This commit is contained in:
2020-09-06 18:32:10 +02:00
parent 61d59cb84a
commit e232256420
2 changed files with 21 additions and 63 deletions
+2 -2
View File
@@ -6,6 +6,7 @@ from ebook_converter import walk
from ebook_converter.constants_old import DEBUG
from ebook_converter.constants_old import filesystem_encoding
from ebook_converter.utils.fonts.metadata import FontMetadata, UnsupportedFont
from ebook_converter.utils import config
class NoFonts(ValueError):
@@ -277,8 +278,7 @@ class FontScanner(Thread):
def reload_cache(self):
if not hasattr(self, 'cache'):
from ebook_converter.utils.config import JSONConfig
self.cache = JSONConfig('fonts/scanner_cache')
self.cache = config.JSONConfig('ebook-converter-scanner-cache')
else:
self.cache.refresh()
if self.cache.get('version', None) != self.CACHE_VERSION: