mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make LRF get_metadata work with either streams or LRFDocuments
This commit is contained in:
parent
74a12c6598
commit
92dc7600e4
@ -231,8 +231,9 @@ def get_metadata(stream):
|
|||||||
"""
|
"""
|
||||||
Return basic meta-data about the LRF file in C{stream} as a
|
Return basic meta-data about the LRF file in C{stream} as a
|
||||||
L{MetaInformation} object.
|
L{MetaInformation} object.
|
||||||
|
@param stream: A file like object or an instance of L{LRFMetaFile}
|
||||||
"""
|
"""
|
||||||
lrf = LRFMetaFile(stream)
|
lrf = stream if isinstance(stream, LRFMetaFile) else LRFMetaFile(stream)
|
||||||
au = lrf.author.strip().split(',')
|
au = lrf.author.strip().split(',')
|
||||||
authors = []
|
authors = []
|
||||||
for i in au:
|
for i in au:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user