mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
GwR revisions
This commit is contained in:
parent
11d8cfb6c9
commit
9d5598a61e
@ -2077,13 +2077,14 @@ class ITUNES(DevicePlugin):
|
|||||||
|
|
||||||
except:
|
except:
|
||||||
# We get here if there was an error with .location().path
|
# We get here if there was an error with .location().path
|
||||||
self.log.info(" removing orphan '%s' from iTunes" % cached_book['title'])
|
if DEBUG:
|
||||||
|
self.log.info(" '%s' not found in iTunes" % cached_book['title'])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.iTunes.delete(cached_book['lib_book'])
|
self.iTunes.delete(cached_book['lib_book'])
|
||||||
except:
|
except:
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
self.log.info(" book not found in iTunes")
|
self.log.info(" '%s' not found in iTunes" % cached_book['title'])
|
||||||
|
|
||||||
elif iswindows:
|
elif iswindows:
|
||||||
'''
|
'''
|
||||||
@ -2096,7 +2097,7 @@ class ITUNES(DevicePlugin):
|
|||||||
except:
|
except:
|
||||||
book = self._find_library_book(cached_book)
|
book = self._find_library_book(cached_book)
|
||||||
|
|
||||||
if book.Location:
|
if book:
|
||||||
storage_path = os.path.split(book.Location)
|
storage_path = os.path.split(book.Location)
|
||||||
if book.Location.startswith(self.iTunes_media):
|
if book.Location.startswith(self.iTunes_media):
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
@ -2117,12 +2118,12 @@ class ITUNES(DevicePlugin):
|
|||||||
self.log.info(" '%s' (stored external to iTunes, no files deleted)" % cached_book['title'])
|
self.log.info(" '%s' (stored external to iTunes, no files deleted)" % cached_book['title'])
|
||||||
else:
|
else:
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
self.log.info(" unable to find Library book '%s'" % cached_book['title'])
|
self.log.info(" '%s' not found in iTunes" % cached_book['title'])
|
||||||
try:
|
try:
|
||||||
book.Delete()
|
book.Delete()
|
||||||
except:
|
except:
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
self.log.info(" book not found in iTunes")
|
self.log.info(" '%s' not found in iTunes" % cached_book['title'])
|
||||||
|
|
||||||
def _update_epub_metadata(self, fpath, metadata):
|
def _update_epub_metadata(self, fpath, metadata):
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user