mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
GwR revisions iDevice driver
This commit is contained in:
parent
781858ca15
commit
531b17171f
@ -1712,9 +1712,9 @@ class ITUNES(DevicePlugin):
|
|||||||
if str(book.description()).startswith(self.description_prefix):
|
if str(book.description()).startswith(self.description_prefix):
|
||||||
if book.location() == appscript.k.missing_value:
|
if book.location() == appscript.k.missing_value:
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
self.log.info(" deleting calibre orphan '%s' from Library|Books" % book.name())
|
self.log.info(" found calibre orphan '%s' in Library|Books" % book.name())
|
||||||
book.delete()
|
#book.delete()
|
||||||
continue
|
#continue
|
||||||
|
|
||||||
path = self.path_template % (book.name(), book.artist())
|
path = self.path_template % (book.name(), book.artist())
|
||||||
library_books[path] = book
|
library_books[path] = book
|
||||||
@ -1768,9 +1768,9 @@ class ITUNES(DevicePlugin):
|
|||||||
if book.Description.startswith(self.description_prefix):
|
if book.Description.startswith(self.description_prefix):
|
||||||
if not book.Location:
|
if not book.Location:
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
self.log.info(" deleting calibre orphan '%s' from Library|Books" % book.Name)
|
self.log.info(" found calibre orphan '%s' in Library|Books" % book.Name)
|
||||||
book.Delete()
|
#book.Delete()
|
||||||
continue
|
#continue
|
||||||
|
|
||||||
path = self.path_template % (book.Name, book.Artist)
|
path = self.path_template % (book.Name, book.Artist)
|
||||||
library_books[path] = book
|
library_books[path] = book
|
||||||
@ -1998,9 +1998,11 @@ class ITUNES(DevicePlugin):
|
|||||||
else:
|
else:
|
||||||
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'])
|
||||||
|
|
||||||
self.iTunes.delete(cached_book['lib_book'])
|
|
||||||
except:
|
except:
|
||||||
self.log.warning(" error removing %s from iTunes" % cached_book['title'])
|
# We get here if there was an error with .location().path
|
||||||
|
self.log.info(" removing orphan '%s' from iTunes" % cached_book['title'])
|
||||||
|
|
||||||
|
self.iTunes.delete(cached_book['lib_book'])
|
||||||
|
|
||||||
elif iswindows:
|
elif iswindows:
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user