Allow using identifiers in save to disk templates. Fixes #1074623 (Bug in templates at 0.9.5 version)

This commit is contained in:
Kovid Goyal 2012-11-06 21:48:58 +05:30
commit b9cefe9989

View File

@ -200,6 +200,11 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250,
template = re.sub(r'\{series_index[^}]*?\}', '', template)
if mi.rating is not None:
format_args['rating'] = mi.format_rating(divide_by=2.0)
if mi.identifiers:
format_args['identifiers'] = mi.format_field_extended('identifiers')[1]
else:
format_args['identifiers'] = ''
if hasattr(mi.timestamp, 'timetuple'):
format_args['timestamp'] = strftime(timefmt, mi.timestamp.timetuple())
if hasattr(mi.pubdate, 'timetuple'):