def handle_start(message): info_hash = message.get('info_hash', []) try: client.get().torrent_start(info_hash) except ClientNotAvailable as exc: api.error_handler(exc, api.EVENT_TORRENT_START_RESPONSE) else: api.emit(api.EVENT_TORRENT_START_RESPONSE, dict(info_hash=info_hash)) api.flash("Started successfully")
def handle_stop(message): info_hash = message.get('info_hash', []) try: torrent_client.torrent_stop(info_hash) except ClientNotAvailable as exc: api.error_handler(exc, events.EVENT_TORRENT_SPEED_RESPONSE) else: api.emit(events.EVENT_TORRENT_SPEED_RESPONSE, dict(info_hash=info_hash)) api.flash("Stopped successfully")
def handle_start(message): info_hash = message.get('info_hash', []) try: torrent_client.torrent_start(info_hash) except ClientNotAvailable as exc: api.error_handler(exc, events.EVENT_TORRENT_START_RESPONSE) else: api.emit(events.EVENT_TORRENT_START_RESPONSE, dict(info_hash=info_hash)) api.flash("Started successfully")
def handle_recheck(message): info_hash = message.get('info_hash', []) resp = torrent_client.torrent_recheck(info_hash) api.emit(events.EVENT_TORRENT_RECHECK_RESPONSE, resp) api.flash("Rechecking..!")
def handle_recheck(message): info_hash = message.get('info_hash', []) resp = client.get().torrent_recheck(info_hash) api.emit(api.EVENT_TORRENT_RECHECK_RESPONSE, resp) api.flash("Rechecking..!")