def jsonrpc_get(self, p):
        """
        Download stream from a LBRY uri

        Args:
            'name': name to download, string
            optional 'download_directory': path to directory where file will be saved, string
        Returns:
            'stream_hash': hex string
            'path': path of download
        """

        if p.keys() not in 'timeout':
            timeout = DEFAULT_TIMEOUT
        else:
            timeout = p['timeout']

        if 'download_directory' not in p.keys():
            download_directory = self.session_settings['default_download_directory']
        else:
            download_directory = p['download_directory']

        if 'name' in p.keys():
            name = p['name']
            d = self._download_name(name=name, timeout=timeout, download_directory=download_directory)
            d.addCallbacks(lambda message: self._render_response(message, OK_CODE),
                           lambda err: self._render_response('error', NOT_FOUND))
        else:
            d = self._render_response('error', BAD_REQUEST)

        return d

    # def jsonrpc_stop_lbry_file(self, p):
    #     params = Bunch(p)
    #
    #     try:
    #         lbry_file = [f for f in self.lbry_file_manager.lbry_files if f.stream_hash == params.stream_hash][0]
    #     except IndexError:
    #         return defer.fail(UnknownNameError)
    #
    #     if not lbry_file.stopped:
    #         d = self.lbry_file_manager.toggle_lbry_file_running(lbry_file)
    #         d.addCallback(lambda _: self._render_response("Stream has been stopped", OK_CODE))
    #         d.addErrback(lambda err: self._render_response(err.getTraceback(), ))
    #         return d
    #     else:
    #         return json.dumps({'result': 'Stream was already stopped'})
    #
    # def jsonrpc_start_lbry_file(self, p):
    #     params = Bunch(p)
    #
    #     try:
    #         lbry_file = [f for f in self.lbry_file_manager.lbry_files if f.stream_hash == params.stream_hash][0]
    #     except IndexError:
    #         return defer.fail(UnknownNameError)
    #
    #     if lbry_file.stopped:
    #         d = self.lbry_file_manager.toggle_lbry_file_running(lbry_file)
    #         d.callback(None)
    #         return json.dumps({'result': 'Stream started'})
    #     else:
    #         return json.dumps({'result': 'Stream was already running'})
dataset/ETHPy150Open lbryio/lbry/lbrynet/lbrynet_daemon/LBRYDaemon.py/LBRYDaemon.jsonrpc_get/swapped operands of `not in`