mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix typo in Hello World plugin
This commit is contained in:
parent
cabb094390
commit
5d91e50f52
@ -83,7 +83,7 @@ def get_metadata(stream, stream_type='lrf', use_libprs_metadata=False):
|
||||
return base
|
||||
|
||||
def set_metadata(stream, mi, stream_type='lrf'):
|
||||
if stream_type:
|
||||
if stream_type:
|
||||
stream_type = stream_type.lower()
|
||||
set_file_type_metadata(stream, mi, stream_type)
|
||||
|
||||
|
@ -46,7 +46,7 @@ Create a file name :file:`my_plugin.py` (the file name must end with plugin.py)
|
||||
ext = os.path.splitext(path_to_ebook)[-1][1:].lower()
|
||||
mi = get_metadata(file, ext)
|
||||
mi.publisher = 'Hello World'
|
||||
set_metadata(file, ext, mi)
|
||||
set_metadata(file, mi, ext)
|
||||
return path_to_ebook
|
||||
|
||||
That's all. To add this code to |app| as a plugin, simply create a zip file with::
|
||||
|
Loading…
x
Reference in New Issue
Block a user