Add newsletter template folder config option

This commit is contained in:
JonnyWong16 2018-03-17 20:32:55 -07:00
parent 1f7be7a4d5
commit bbca0b3b42
2 changed files with 2 additions and 1 deletions

View file

@ -248,6 +248,7 @@ _CONFIG_DEFINITIONS = {
'HIPCHAT_ON_CONCURRENT': (int, 'Hipchat', 0),
'HIPCHAT_ON_NEWDEVICE': (int, 'Hipchat', 0),
'INTERFACE': (str, 'General', 'default'),
'INTERFACE_NEWSLETTERS': (str, 'General', 'newsletters'),
'IP_LOGGING_ENABLE': (int, 'General', 0),
'IFTTT_KEY': (str, 'IFTTT', ''),
'IFTTT_EVENT': (str, 'IFTTT', 'tautulli'),

View file

@ -244,7 +244,7 @@ def send_newsletter(newsletter_id=None, subject=None, notify_action='', newslett
def serve_template(templatename, **kwargs):
interface_dir = os.path.join(str(plexpy.PROG_DIR), 'data/interfaces/')
template_dir = os.path.join(str(interface_dir), 'newsletters')
template_dir = os.path.join(str(interface_dir), plexpy.CONFIG.INTERFACE_NEWSLETTERS)
_hplookup = TemplateLookup(directories=[template_dir], default_filters=['unicode', 'h'])