Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Jan 21, 2025
1 parent fe4e0aa commit 5ed0eda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/calibre/devices/mtp/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ def get_file(self, path, outfile, end_session=True):
f = self.filesystem_cache.resolve_mtp_id_path(path)
self.get_mtp_file(f, outfile)

def get_file_by_name(self, outfile, parent, *names):
def get_file_by_name(self, outfile, parent: FileOrFolder, *names: str) -> None:
' Get the file parent/ + "/".join(names) and put it into outfile. Works with files not cached in FilesystemCache. '
self.get_mtp_file_by_name(parent, *names, stream=outfile)

def list_folder_by_name(self, parent, *names):
def list_folder_by_name(self, parent: FileOrFolder, *names: str) ->tuple[ListEntry, ...]:
' List the contents of the folder parent/ + "/".join(names). Works with folders not cached in FilesystemCache. '
return tuple(ListEntry(x['name'], x['is_folder'], x['size'], convert_timestamp(x['modified'])) for x in self.list_mtp_folder_by_name(parent, *names))

Expand Down

0 comments on commit 5ed0eda

Please sign in to comment.