mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
...
This commit is contained in:
parent
86726f44d8
commit
4d7ed1b4c6
@ -80,6 +80,10 @@ class FileOrFolder(object):
|
||||
__str__ = __repr__
|
||||
__unicode__ = __repr__
|
||||
|
||||
@property
|
||||
def empty(self):
|
||||
return not self.files and not self.folders
|
||||
|
||||
@property
|
||||
def id_map(self):
|
||||
return self.fs_cache().id_map
|
||||
@ -217,6 +221,8 @@ class FilesystemCache(object):
|
||||
def iterebooks(self, storage_id):
|
||||
for x in self.id_map.itervalues():
|
||||
if x.storage_id == storage_id and x.is_ebook:
|
||||
if x.parent_id == storage_id and x.name.lower().endswith('.txt'):
|
||||
continue # Ignore .txt files in the root
|
||||
yield x
|
||||
|
||||
def resolve_mtp_id_path(self, path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user