From 72645c9d697cf830c59ffe9f015c55ba47e1d6a1 Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Tue, 6 Dec 2016 08:21:22 +0000 Subject: [PATCH] Format non-default feed parameters. --- plugin/feeds/feeds.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugin/feeds/feeds.py b/plugin/feeds/feeds.py index 92e4956..0b34ec6 100644 --- a/plugin/feeds/feeds.py +++ b/plugin/feeds/feeds.py @@ -356,10 +356,14 @@ class Feeds(DBConnection): text += ' in <#{}>'.format(feed['channel_id']) if feed['interval']: text += ' every {}'.format(bot.unparse_seconds(int(feed['interval']))) - text += ' date {}'.format(feed['date']) - text += ' summary {}'.format(feed['summary']) - text += ' link {}'.format(feed['show_link']) - text += ' permissions {}'.format(feed['permissions']) + if not bot.parse_boolean(feed['date']): + text += ' date {}'.format(feed['date']) + if bot.parse_boolean(feed['summary']): + text += ' summary {}'.format(feed['summary']) + if not bot.parse_boolean(feed['show_link']): + text += ' link {}'.format(feed['show_link']) + if not bot.parse_boolean(feed['permissions']): + text += ' permissions {}'.format(feed['permissions']) if feed['link_json']: text += "--link_json '{}'".format(feed['link_json']) lines.append(text) -- 2.7.4