mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-15 13:22:23 +01:00
Fix for browser_cache with bgmeta.
This commit is contained in:
parent
d8daf768a9
commit
eba91eaf65
1 changed files with 9 additions and 4 deletions
|
|
@ -1700,10 +1700,15 @@ class FanFicFarePlugin(InterfaceAction):
|
|||
|
||||
## save and pass cookiejar and caches to BG downloads.
|
||||
if 'browser_cache' in options:
|
||||
browser_cachefile = PersistentTemporaryFile(suffix='.browser_cache',
|
||||
dir=options['tdir'])
|
||||
options['browser_cache'].save_cache(browser_cachefile.name)
|
||||
options['browser_cachefile'] = browser_cachefile.name
|
||||
if not options['bgmeta']:
|
||||
## With load-on-demand, the cache exists, but hasn't
|
||||
## been loaded. Once it is (file)loaded in jobs, it's
|
||||
## marked as having been 'loaded'. So don't send when
|
||||
## bgmeta
|
||||
browser_cachefile = PersistentTemporaryFile(suffix='.browser_cache',
|
||||
dir=options['tdir'])
|
||||
options['browser_cache'].save_cache(browser_cachefile.name)
|
||||
options['browser_cachefile'] = browser_cachefile.name
|
||||
## can't be pickled by Calibre to send to BG proc
|
||||
del options['browser_cache']
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue