mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Save to disk/send to device templates: Always render {series_index} as an empty string when the book has no series. Fixes #6409 (Make series_index empty string if series empty string)
This commit is contained in:
parent
3c266410be
commit
88e962ae39
@ -125,6 +125,8 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250,
|
||||
format_args['series'] = mi.series
|
||||
if mi.series_index is not None:
|
||||
format_args['series_index'] = mi.format_series_index()
|
||||
else:
|
||||
template = re.sub(r'\{series_index[^}]*?\}', '', template)
|
||||
if mi.rating is not None:
|
||||
format_args['rating'] = mi.format_rating()
|
||||
if mi.isbn:
|
||||
|
Loading…
x
Reference in New Issue
Block a user