From 4f7c84c54c28d600fb304417ce349f1c7bc66037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 2 Sep 2018 19:55:18 +0200 Subject: [PATCH] Ignore by default, only dl w/ hashtag --- delojza.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/delojza.py b/delojza.py index 31faf8b..9013bc5 100755 --- a/delojza.py +++ b/delojza.py @@ -119,13 +119,13 @@ def handle_hashtag(bot, update): # noinspection PyBroadException def handle(urls, message, download, filename=None): try: - logger.info("Downloading %s" % urls) hashtag = get_first_hashtag(message) - - if hashtag == 'IGNORE': - message.reply_text('Ignoring...') + if hashtag is None: + logger.info("Ignoring %s due to no hashtag present..." % urls) return + logger.info("Downloading %s" % urls) + reply = 'Downloading' if hashtag: mkdir_p(f'{OUT_DIR}/{hashtag}')