mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Provisional patch for relocated cache dir. Not fully tested.
This commit is contained in:
parent
1291cfcd12
commit
7b293d3caa
@ -9,7 +9,7 @@ import cStringIO, ctypes, datetime, os, platform, re, shutil, sys, tempfile, tim
|
|||||||
|
|
||||||
from calibre.constants import __appname__, __version__, DEBUG as CALIBRE_DEBUG
|
from calibre.constants import __appname__, __version__, DEBUG as CALIBRE_DEBUG
|
||||||
from calibre import fit_image, confirm_config_name, strftime as _strftime
|
from calibre import fit_image, confirm_config_name, strftime as _strftime
|
||||||
from calibre.constants import isosx, iswindows
|
from calibre.constants import isosx, iswindows, cache_dir as _cache_dir
|
||||||
from calibre.devices.errors import OpenFeedback, UserFeedback
|
from calibre.devices.errors import OpenFeedback, UserFeedback
|
||||||
from calibre.devices.usbms.deviceconfig import DeviceConfig
|
from calibre.devices.usbms.deviceconfig import DeviceConfig
|
||||||
from calibre.devices.interface import DevicePlugin
|
from calibre.devices.interface import DevicePlugin
|
||||||
@ -291,6 +291,8 @@ class ITUNES(DriverBase):
|
|||||||
|
|
||||||
# Properties
|
# Properties
|
||||||
cached_books = {}
|
cached_books = {}
|
||||||
|
cache_dir = os.path.join(_cache_dir(), 'itunes')
|
||||||
|
archive_path = os.path.join(cache_dir, "thumbs.zip")
|
||||||
calibre_library_path = prefs['library_path']
|
calibre_library_path = prefs['library_path']
|
||||||
description_prefix = "added by calibre"
|
description_prefix = "added by calibre"
|
||||||
ejected = False
|
ejected = False
|
||||||
@ -885,8 +887,6 @@ class ITUNES(DriverBase):
|
|||||||
logger().info(" BCD: %s" % ['0x%x' % x for x in sorted(self.BCD)])
|
logger().info(" BCD: %s" % ['0x%x' % x for x in sorted(self.BCD)])
|
||||||
logger().info(" PRODUCT_ID: %s" % ['0x%x' % x for x in sorted(self.PRODUCT_ID)])
|
logger().info(" PRODUCT_ID: %s" % ['0x%x' % x for x in sorted(self.PRODUCT_ID)])
|
||||||
|
|
||||||
self.cache_dir = os.path.join(cache_dir(), 'itunes')
|
|
||||||
self.archive_path = os.path.join(self.cache_dir, "thumbs.zip")
|
|
||||||
# Confirm/create thumbs archive
|
# Confirm/create thumbs archive
|
||||||
if not os.path.exists(self.cache_dir):
|
if not os.path.exists(self.cache_dir):
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user