From fcad9e0be5fd4e21f24eed0d89e4bcac9a563c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20K=C3=A5berg?= Date: Wed, 22 May 2013 11:02:59 +0200 Subject: [PATCH] fireAsync made optional --- couchpotato/core/plugins/renamer/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/renamer/main.py b/couchpotato/core/plugins/renamer/main.py index dd0ea46b..7ca29cba 100644 --- a/couchpotato/core/plugins/renamer/main.py +++ b/couchpotato/core/plugins/renamer/main.py @@ -62,11 +62,14 @@ class Renamer(Plugin): def scanView(self): params = getParams() + async = tryInt(params.get('async', None)) movie_folder = params.get('movie_folder', None) downloader = params.get('downloader', None) download_id = params.get('download_id', None) - fireEventAsync('renamer.scan', + fire_handle = fireEvent if not async else fireEventAsync + + fire_handle('renamer.scan', movie_folder = movie_folder, download_info = {'id': download_id, 'downloader': downloader} if download_id else None )