diff options
Diffstat (limited to 'pyload/interaction/InteractionTask.py')
-rw-r--r-- | pyload/interaction/InteractionTask.py | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/pyload/interaction/InteractionTask.py b/pyload/interaction/InteractionTask.py index b404aa6ce..498d807c0 100644 --- a/pyload/interaction/InteractionTask.py +++ b/pyload/interaction/InteractionTask.py @@ -1,27 +1,25 @@ # -*- coding: utf-8 -*- -""" - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see <http://www.gnu.org/licenses/>. - - @author: RaNaN -""" +############################################################################### +# Copyright(c) 2008-2014 pyLoad Team +# http://www.pyload.org +# +# This file is part of pyLoad. +# pyLoad is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# Subjected to the terms and conditions in LICENSE +# +# @author: RaNaN +############################################################################### from time import time from pyload.Api import InteractionTask as BaseInteractionTask from pyload.Api import Interaction, InputType, Input -#noinspection PyUnresolvedReferences +# noinspection PyUnresolvedReferences class InteractionTask(BaseInteractionTask): """ General Interaction Task extends ITask defined by api with additional fields and methods. @@ -61,6 +59,10 @@ class InteractionTask(BaseInteractionTask): self.wait_until = 0 def convertResult(self, value): + if self.input.type == InputType.Click: + parts = value.split(',') + return int(parts[0]), int(parts[1]) + #TODO: convert based on input/output return value |