'Upload book cover to the device. Default implementation does nothing.
:param path: The full path to the directory where the associated book is located.
:param filename: The name of the book file without the extension.
:param metadata: metadata belonging to the book. Use metadata.thumbnail
for cover
:param filepath: The full path to the ebook file'

def upload_cover(self, path, filename, metadata, filepath):

    opts = self.settings()
    if (not opts.extra_customization[self.OPT_UPLOAD_COVERS]):
        debug_print('KOBO:    not    uploading    cover')
        return
    if (not opts.extra_customization[self.OPT_UPLOAD_GRAYSCALE_COVERS]):
        uploadgrayscale = False
    else:
        uploadgrayscale = True
    debug_print('KOBO:    uploading    cover')
    try:
        self._upload_cover(path, filename, metadata, filepath, uploadgrayscale)
    except:
        debug_print('FAILED    to    upload    cover', filepath)
