mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-30 15:47:15 +01:00
...
This commit is contained in:
parent
0b02c1f593
commit
7a1d05199e
2 changed files with 12 additions and 2 deletions
|
|
@ -45,8 +45,9 @@ def reset(self, key='-1', log_packets=False, report_progress=None,
|
|||
def set_progress_reporter(self, report_progress):
|
||||
self.report_progress = report_progress
|
||||
|
||||
def get_gui_name(self):
|
||||
return self.current_friendly_name or self.name
|
||||
@classmethod
|
||||
def get_gui_name(cls):
|
||||
return getattr(cls, 'current_friendly_name', cls.gui_name)
|
||||
|
||||
def is_usb_connected(self, devices_on_system, debug=False,
|
||||
only_presence=False):
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
import json, traceback, posixpath, importlib, os
|
||||
from io import BytesIO
|
||||
from itertools import izip
|
||||
|
||||
from calibre import prints
|
||||
from calibre.constants import iswindows, numeric_version
|
||||
|
|
@ -244,10 +245,18 @@ def create_upload_path(self, path, mdata, fname):
|
|||
)
|
||||
return tuple(x.lower() for x in filepath.split('/'))
|
||||
|
||||
def prefix_for_location(self, on_card):
|
||||
# TODO: Implement this
|
||||
return 'calibre'
|
||||
|
||||
def upload_books(self, files, names, on_card=None, end_session=True,
|
||||
metadata=None):
|
||||
from calibre.devices.utils import sanity_check
|
||||
sanity_check(on_card, files, self.card_prefix(), self.free_space())
|
||||
prefix = self.prefix_for_location(on_card)
|
||||
for infile, fname, mi in izip(files, names, metadata):
|
||||
path = self.create_upload_path(prefix, mi, fname)
|
||||
print (1111111, path)
|
||||
raise NotImplementedError()
|
||||
|
||||
# }}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue