{"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/httpserver.py","language":"python","identifier":"HttpdStart","parameters":"(session)","argument_list":"","return_statement":"","docstring":"Helper class to start web server\n\n\tArgs:\n\t\tsession: (?) session object","docstring_summary":"Helper class to start web server","docstring_tokens":["Helper","class","to","start","web","server"],"function":"def HttpdStart(session):\n\t\"\"\"\n\tHelper class to start web server\n\n\tArgs:\n\t\tsession: (?) session object\n\t\"\"\"\n\tif config.OpenWebif.enabled.value is True:\n\t\tglobal listener, site, sslsite\n\t\tport = config.OpenWebif.port.value\n\t\tif listener != None and len(listener) > 0:\n\t\t\tprint(\"[OpenWebif] httpserver already started\")\n\t\t\treturn\n\n\t\ttemproot = buildRootTree(session)\n\t\troot = AuthResource(session, temproot)\n\t\tsite = server.Site(root)\n\t\tsite.displayTracebacks = config.OpenWebif.displayTracebacks.value\n\n\t\t# start http webserver on configured port\n\t\ttry:\n\t\t\tif has_ipv6 and fileExists('\/proc\/net\/if_inet6') and version.major >= 12:\n\t\t\t\t# use ipv6\n\t\t\t\tlistener.append(reactor.listenTCP(port, site, interface='::'))\n\t\t\telse:\n\t\t\t\t# ipv4 only\n\t\t\t\tlistener.append(reactor.listenTCP(port, site))\n\t\t\tprint(\"[OpenWebif] started on %i\" % (port))\n\t\t\tBJregisterService('http', port)\n\t\texcept CannotListenError:\n\t\t\tprint(\"[OpenWebif] failed to listen on Port %i\" % (port))\n\n\t\tif config.OpenWebif.https_clientcert.value is True and not os.path.exists(CA_FILE):\n\t\t\t# Disable https\n\t\t\tconfig.OpenWebif.https_enabled.value = False\n\t\t\tconfig.OpenWebif.https_enabled.save()\n\t\t\t# Inform the user\n\t\t\tsession.open(MessageBox, \"Cannot read CA certs for HTTPS access\\nHTTPS access is disabled!\", MessageBox.TYPE_ERROR)\n\n\t\tif config.OpenWebif.https_enabled.value is True:\n\t\t\thttpsPort = config.OpenWebif.https_port.value\n\t\t\tinstallCertificates(session)\n\t\t\t# start https webserver on port configured port\n\t\t\ttry:\n\t\t\t\ttry:\n\t\t\t\t\tkey = crypto.load_privatekey(crypto.FILETYPE_PEM, open(KEY_FILE, 'rt').read())\n\t\t\t\t\tcert = crypto.load_certificate(crypto.FILETYPE_PEM, open(CERT_FILE, 'rt').read())\n\t\t\t\t\tprint(\"[OpenWebif] CHAIN_FILE = %s\" % CHAIN_FILE)\n\t\t\t\t\tchain = None\n\t\t\t\t\tif os.path.exists(CHAIN_FILE):\n\t\t\t\t\t\tchain = [crypto.load_certificate(crypto.FILETYPE_PEM, open(CHAIN_FILE, 'rt').read())]\n\t\t\t\t\t\tprint(\"[OpenWebif] ssl chain file found - loading\")\n\t\t\t\t\tcontext = ssl.CertificateOptions(privateKey=key, certificate=cert, extraCertChain=chain)\n\t\t\t\texcept: # nosec # noqa: E722\n\t\t\t\t\t# THIS EXCEPTION IS ONLY CATCHED WHEN CERT FILES ARE BAD (look below for error)\n\t\t\t\t\tprint(\"[OpenWebif] failed to get valid cert files. (It could occure bad file save or format, removing...)\")\n\t\t\t\t\t# removing bad files\n\t\t\t\t\tif os.path.exists(KEY_FILE):\n\t\t\t\t\t\tos.remove(KEY_FILE)\n\t\t\t\t\tif os.path.exists(CERT_FILE):\n\t\t\t\t\t\tos.remove(CERT_FILE)\n\t\t\t\t\t# regenerate new ones\n\t\t\t\t\tinstallCertificates(session)\n\t\t\t\t\tcontext = ssl.DefaultOpenSSLContextFactory(KEY_FILE, CERT_FILE)\n\n\t\t\t\tif config.OpenWebif.https_clientcert.value is True:\n\t\t\t\t\tctx = context.getContext()\n\t\t\t\t\tctx.set_verify(\n\t\t\t\t\t\tSSL.VERIFY_PEER | SSL.VERIFY_FAIL_IF_NO_PEER_CERT,\n\t\t\t\t\t\tverifyCallback\n\t\t\t\t\t\t)\n\t\t\t\t\tctx.load_verify_locations(CA_FILE)\n\n\t\t\t\tsslroot = AuthResource(session, temproot)\n\t\t\t\tsslsite = server.Site(sslroot)\n\n\t\t\t\tif has_ipv6 and fileExists('\/proc\/net\/if_inet6') and version.major >= 12:\n\t\t\t\t\t# use ipv6\n\t\t\t\t\tlistener.append(reactor.listenSSL(httpsPort, sslsite, context, interface='::'))\n\t\t\t\telse:\n\t\t\t\t\t# ipv4 only\n\t\t\t\t\tlistener.append(reactor.listenSSL(httpsPort, sslsite, context))\n\t\t\t\tprint(\"[OpenWebif] started on\", httpsPort)\n\t\t\t\tBJregisterService('https', httpsPort)\n\t\t\texcept CannotListenError:\n\t\t\t\tprint(\"[OpenWebif] failed to listen on Port\", httpsPort)\n\t\t\texcept: # nosec # noqa: E722\n\t\t\t\tprint(\"[OpenWebif] failed to start https, disabling...\")\n\t\t\t\t# Disable https\n\t\t\t\tconfig.OpenWebif.https_enabled.value = False\n\t\t\t\tconfig.OpenWebif.https_enabled.save()\n\n\t\t# Streaming requires listening on 127.0.0.1:80\n\t\tif port != 80:\n\t\t\ttry:\n\t\t\t\tif has_ipv6 and fileExists('\/proc\/net\/if_inet6') and version.major >= 12:\n\t\t\t\t\t# use ipv6\n\t\t\t\t\t# Dear Twisted devs: Learning English, lesson 1 - interface != address\n\t\t\t\t\tlistener.append(reactor.listenTCP(80, site, interface='::1'))\n\t\t\t\t\tlistener.append(reactor.listenTCP(80, site, interface='::ffff:127.0.0.1'))\n\t\t\t\telse:\n\t\t\t\t\t# ipv4 only\n\t\t\t\t\tlistener.append(reactor.listenTCP(80, site, interface='127.0.0.1'))\n\t\t\t\tprint(\"[OpenWebif] started stream listening on port 80\")\n\t\t\texcept CannotListenError:\n\t\t\t\tprint(\"[OpenWebif] port 80 busy\")","function_tokens":["def","HttpdStart","(","session",")",":","if","config",".","OpenWebif",".","enabled",".","value","is","True",":","global","listener",",","site",",","sslsite","port","=","config",".","OpenWebif",".","port",".","value","if","listener","!=","None","and","len","(","listener",")",">","0",":","print","(","\"[OpenWebif] httpserver already started\"",")","return","temproot","=","buildRootTree","(","session",")","root","=","AuthResource","(","session",",","temproot",")","site","=","server",".","Site","(","root",")","site",".","displayTracebacks","=","config",".","OpenWebif",".","displayTracebacks",".","value","# start http webserver on configured port","try",":","if","has_ipv6","and","fileExists","(","'\/proc\/net\/if_inet6'",")","and","version",".","major",">=","12",":","# use ipv6","listener",".","append","(","reactor",".","listenTCP","(","port",",","site",",","interface","=","'::'",")",")","else",":","# ipv4 only","listener",".","append","(","reactor",".","listenTCP","(","port",",","site",")",")","print","(","\"[OpenWebif] started on %i\"","%","(","port",")",")","BJregisterService","(","'http'",",","port",")","except","CannotListenError",":","print","(","\"[OpenWebif] failed to listen on Port %i\"","%","(","port",")",")","if","config",".","OpenWebif",".","https_clientcert",".","value","is","True","and","not","os",".","path",".","exists","(","CA_FILE",")",":","# Disable https","config",".","OpenWebif",".","https_enabled",".","value","=","False","config",".","OpenWebif",".","https_enabled",".","save","(",")","# Inform the user","session",".","open","(","MessageBox",",","\"Cannot read CA certs for HTTPS access\\nHTTPS access is disabled!\"",",","MessageBox",".","TYPE_ERROR",")","if","config",".","OpenWebif",".","https_enabled",".","value","is","True",":","httpsPort","=","config",".","OpenWebif",".","https_port",".","value","installCertificates","(","session",")","# start https webserver on port configured port","try",":","try",":","key","=","crypto",".","load_privatekey","(","crypto",".","FILETYPE_PEM",",","open","(","KEY_FILE",",","'rt'",")",".","read","(",")",")","cert","=","crypto",".","load_certificate","(","crypto",".","FILETYPE_PEM",",","open","(","CERT_FILE",",","'rt'",")",".","read","(",")",")","print","(","\"[OpenWebif] CHAIN_FILE = %s\"","%","CHAIN_FILE",")","chain","=","None","if","os",".","path",".","exists","(","CHAIN_FILE",")",":","chain","=","[","crypto",".","load_certificate","(","crypto",".","FILETYPE_PEM",",","open","(","CHAIN_FILE",",","'rt'",")",".","read","(",")",")","]","print","(","\"[OpenWebif] ssl chain file found - loading\"",")","context","=","ssl",".","CertificateOptions","(","privateKey","=","key",",","certificate","=","cert",",","extraCertChain","=","chain",")","except",":","# nosec # noqa: E722","# THIS EXCEPTION IS ONLY CATCHED WHEN CERT FILES ARE BAD (look below for error)","print","(","\"[OpenWebif] failed to get valid cert files. (It could occure bad file save or format, removing...)\"",")","# removing bad files","if","os",".","path",".","exists","(","KEY_FILE",")",":","os",".","remove","(","KEY_FILE",")","if","os",".","path",".","exists","(","CERT_FILE",")",":","os",".","remove","(","CERT_FILE",")","# regenerate new ones","installCertificates","(","session",")","context","=","ssl",".","DefaultOpenSSLContextFactory","(","KEY_FILE",",","CERT_FILE",")","if","config",".","OpenWebif",".","https_clientcert",".","value","is","True",":","ctx","=","context",".","getContext","(",")","ctx",".","set_verify","(","SSL",".","VERIFY_PEER","|","SSL",".","VERIFY_FAIL_IF_NO_PEER_CERT",",","verifyCallback",")","ctx",".","load_verify_locations","(","CA_FILE",")","sslroot","=","AuthResource","(","session",",","temproot",")","sslsite","=","server",".","Site","(","sslroot",")","if","has_ipv6","and","fileExists","(","'\/proc\/net\/if_inet6'",")","and","version",".","major",">=","12",":","# use ipv6","listener",".","append","(","reactor",".","listenSSL","(","httpsPort",",","sslsite",",","context",",","interface","=","'::'",")",")","else",":","# ipv4 only","listener",".","append","(","reactor",".","listenSSL","(","httpsPort",",","sslsite",",","context",")",")","print","(","\"[OpenWebif] started on\"",",","httpsPort",")","BJregisterService","(","'https'",",","httpsPort",")","except","CannotListenError",":","print","(","\"[OpenWebif] failed to listen on Port\"",",","httpsPort",")","except",":","# nosec # noqa: E722","print","(","\"[OpenWebif] failed to start https, disabling...\"",")","# Disable https","config",".","OpenWebif",".","https_enabled",".","value","=","False","config",".","OpenWebif",".","https_enabled",".","save","(",")","# Streaming requires listening on 127.0.0.1:80","if","port","!=","80",":","try",":","if","has_ipv6","and","fileExists","(","'\/proc\/net\/if_inet6'",")","and","version",".","major",">=","12",":","# use ipv6","# Dear Twisted devs: Learning English, lesson 1 - interface != address","listener",".","append","(","reactor",".","listenTCP","(","80",",","site",",","interface","=","'::1'",")",")","listener",".","append","(","reactor",".","listenTCP","(","80",",","site",",","interface","=","'::ffff:127.0.0.1'",")",")","else",":","# ipv4 only","listener",".","append","(","reactor",".","listenTCP","(","80",",","site",",","interface","=","'127.0.0.1'",")",")","print","(","\"[OpenWebif] started stream listening on port 80\"",")","except","CannotListenError",":","print","(","\"[OpenWebif] port 80 busy\"",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/httpserver.py#L177-L282"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.__init__","parameters":"(self, *args, **kwds)","argument_list":"","return_statement":"","docstring":"Initialize an ordered dictionary. Signature is the same as for\n\t\tregular dictionaries, but keyword arguments are not recommended\n\t\tbecause their insertion order is arbitrary.","docstring_summary":"Initialize an ordered dictionary. Signature is the same as for\n\t\tregular dictionaries, but keyword arguments are not recommended\n\t\tbecause their insertion order is arbitrary.","docstring_tokens":["Initialize","an","ordered","dictionary",".","Signature","is","the","same","as","for","regular","dictionaries","but","keyword","arguments","are","not","recommended","because","their","insertion","order","is","arbitrary","."],"function":"def __init__(self, *args, **kwds):\n\t\t'''Initialize an ordered dictionary. Signature is the same as for\n\t\tregular dictionaries, but keyword arguments are not recommended\n\t\tbecause their insertion order is arbitrary.\n\t\t'''\n\t\tif len(args) > 1:\n\t\t\traise TypeError('expected at most 1 arguments, got %d' % len(args))\n\t\ttry:\n\t\t\tself.__root\n\t\texcept AttributeError:\n\t\t\tself.__root = root = []\t\t\t\t\t # sentinel node\n\t\t\troot[:] = [root, root, None]\n\t\t\tself.__map = {}\n\t\tself.__update(*args, **kwds)","function_tokens":["def","__init__","(","self",",","*","args",",","*","*","kwds",")",":","if","len","(","args",")",">","1",":","raise","TypeError","(","'expected at most 1 arguments, got %d'","%","len","(","args",")",")","try",":","self",".","__root","except","AttributeError",":","self",".","__root","=","root","=","[","]","# sentinel node","root","[",":","]","=","[","root",",","root",",","None","]","self",".","__map","=","{","}","self",".","__update","(","*","args",",","*","*","kwds",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L29-L42"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.__setitem__","parameters":"(self, key, value, dict_setitem=dict.__setitem__)","argument_list":"","return_statement":"","docstring":"od.__setitem__(i, y) <==> od[i]=y","docstring_summary":"od.__setitem__(i, y) <==> od[i]=y","docstring_tokens":["od",".","__setitem__","(","i","y",")","<","==",">","od","[","i","]","=","y"],"function":"def __setitem__(self, key, value, dict_setitem=dict.__setitem__):\n\t\t'od.__setitem__(i, y) <==> od[i]=y'\n\t\t# Setting a new item creates a new link which goes at the end of the linked\n\t\t# list, and the inherited dictionary is updated with the new key\/value pair.\n\t\tif key not in self:\n\t\t\troot = self.__root\n\t\t\tlast = root[0]\n\t\t\tlast[1] = root[0] = self.__map[key] = [last, root, key]\n\t\tdict_setitem(self, key, value)","function_tokens":["def","__setitem__","(","self",",","key",",","value",",","dict_setitem","=","dict",".","__setitem__",")",":","# Setting a new item creates a new link which goes at the end of the linked","# list, and the inherited dictionary is updated with the new key\/value pair.","if","key","not","in","self",":","root","=","self",".","__root","last","=","root","[","0","]","last","[","1","]","=","root","[","0","]","=","self",".","__map","[","key","]","=","[","last",",","root",",","key","]","dict_setitem","(","self",",","key",",","value",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L44-L52"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.__delitem__","parameters":"(self, key, dict_delitem=dict.__delitem__)","argument_list":"","return_statement":"","docstring":"od.__delitem__(y) <==> del od[y]","docstring_summary":"od.__delitem__(y) <==> del od[y]","docstring_tokens":["od",".","__delitem__","(","y",")","<","==",">","del","od","[","y","]"],"function":"def __delitem__(self, key, dict_delitem=dict.__delitem__):\n\t\t'od.__delitem__(y) <==> del od[y]'\n\t\t# Deleting an existing item uses self.__map to find the link which is\n\t\t# then removed by updating the links in the predecessor and successor nodes.\n\t\tdict_delitem(self, key)\n\t\tlink_prev, link_next, key = self.__map.pop(key)\n\t\tlink_prev[1] = link_next\n\t\tlink_next[0] = link_prev","function_tokens":["def","__delitem__","(","self",",","key",",","dict_delitem","=","dict",".","__delitem__",")",":","# Deleting an existing item uses self.__map to find the link which is","# then removed by updating the links in the predecessor and successor nodes.","dict_delitem","(","self",",","key",")","link_prev",",","link_next",",","key","=","self",".","__map",".","pop","(","key",")","link_prev","[","1","]","=","link_next","link_next","[","0","]","=","link_prev"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L54-L61"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.__iter__","parameters":"(self)","argument_list":"","return_statement":"","docstring":"od.__iter__() <==> iter(od)","docstring_summary":"od.__iter__() <==> iter(od)","docstring_tokens":["od",".","__iter__","()","<","==",">","iter","(","od",")"],"function":"def __iter__(self):\n\t\t'od.__iter__() <==> iter(od)'\n\t\troot = self.__root\n\t\tcurr = root[1]\n\t\twhile curr is not root:\n\t\t\tyield curr[2]\n\t\t\tcurr = curr[1]","function_tokens":["def","__iter__","(","self",")",":","root","=","self",".","__root","curr","=","root","[","1","]","while","curr","is","not","root",":","yield","curr","[","2","]","curr","=","curr","[","1","]"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L63-L69"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.__reversed__","parameters":"(self)","argument_list":"","return_statement":"","docstring":"od.__reversed__() <==> reversed(od)","docstring_summary":"od.__reversed__() <==> reversed(od)","docstring_tokens":["od",".","__reversed__","()","<","==",">","reversed","(","od",")"],"function":"def __reversed__(self):\n\t\t'od.__reversed__() <==> reversed(od)'\n\t\troot = self.__root\n\t\tcurr = root[0]\n\t\twhile curr is not root:\n\t\t\tyield curr[2]\n\t\t\tcurr = curr[0]","function_tokens":["def","__reversed__","(","self",")",":","root","=","self",".","__root","curr","=","root","[","0","]","while","curr","is","not","root",":","yield","curr","[","2","]","curr","=","curr","[","0","]"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L71-L77"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.clear","parameters":"(self)","argument_list":"","return_statement":"","docstring":"od.clear() -> None. Remove all items from od.","docstring_summary":"od.clear() -> None. Remove all items from od.","docstring_tokens":["od",".","clear","()","-",">","None",".","Remove","all","items","from","od","."],"function":"def clear(self):\n\t\t'od.clear() -> None. Remove all items from od.'\n\t\ttry:\n\t\t\tfor node in self.__map.itervalues():\n\t\t\t\tdel node[:]\n\t\t\troot = self.__root\n\t\t\troot[:] = [root, root, None]\n\t\t\tself.__map.clear()\n\t\texcept AttributeError:\n\t\t\tpass\n\t\tdict.clear(self)","function_tokens":["def","clear","(","self",")",":","try",":","for","node","in","self",".","__map",".","itervalues","(",")",":","del","node","[",":","]","root","=","self",".","__root","root","[",":","]","=","[","root",",","root",",","None","]","self",".","__map",".","clear","(",")","except","AttributeError",":","pass","dict",".","clear","(","self",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L79-L89"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.popitem","parameters":"(self, last=True)","argument_list":"","return_statement":"return key, value","docstring":"od.popitem() -> (k, v), return and remove a (key, value) pair.\n\t\tPairs are returned in LIFO order if last is true or FIFO order if false.","docstring_summary":"od.popitem() -> (k, v), return and remove a (key, value) pair.\n\t\tPairs are returned in LIFO order if last is true or FIFO order if false.","docstring_tokens":["od",".","popitem","()","-",">","(","k","v",")","return","and","remove","a","(","key","value",")","pair",".","Pairs","are","returned","in","LIFO","order","if","last","is","true","or","FIFO","order","if","false","."],"function":"def popitem(self, last=True):\n\t\t'''od.popitem() -> (k, v), return and remove a (key, value) pair.\n\t\tPairs are returned in LIFO order if last is true or FIFO order if false.\n\t\t'''\n\t\tif not self:\n\t\t\traise KeyError('dictionary is empty')\n\t\troot = self.__root\n\t\tif last:\n\t\t\tlink = root[0]\n\t\t\tlink_prev = link[0]\n\t\t\tlink_prev[1] = root\n\t\t\troot[0] = link_prev\n\t\telse:\n\t\t\tlink = root[1]\n\t\t\tlink_next = link[1]\n\t\t\troot[1] = link_next\n\t\t\tlink_next[0] = root\n\t\tkey = link[2]\n\t\tdel self.__map[key]\n\t\tvalue = dict.pop(self, key)\n\t\treturn key, value","function_tokens":["def","popitem","(","self",",","last","=","True",")",":","if","not","self",":","raise","KeyError","(","'dictionary is empty'",")","root","=","self",".","__root","if","last",":","link","=","root","[","0","]","link_prev","=","link","[","0","]","link_prev","[","1","]","=","root","root","[","0","]","=","link_prev","else",":","link","=","root","[","1","]","link_next","=","link","[","1","]","root","[","1","]","=","link_next","link_next","[","0","]","=","root","key","=","link","[","2","]","del","self",".","__map","[","key","]","value","=","dict",".","pop","(","self",",","key",")","return","key",",","value"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L91-L111"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.keys","parameters":"(self)","argument_list":"","return_statement":"return list(self)","docstring":"od.keys() -> list of keys in od","docstring_summary":"od.keys() -> list of keys in od","docstring_tokens":["od",".","keys","()","-",">","list","of","keys","in","od"],"function":"def keys(self):\n\t\t'od.keys() -> list of keys in od'\n\t\treturn list(self)","function_tokens":["def","keys","(","self",")",":","return","list","(","self",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L115-L117"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.values","parameters":"(self)","argument_list":"","return_statement":"return [self[key] for key in self]","docstring":"od.values() -> list of values in od","docstring_summary":"od.values() -> list of values in od","docstring_tokens":["od",".","values","()","-",">","list","of","values","in","od"],"function":"def values(self):\n\t\t'od.values() -> list of values in od'\n\t\treturn [self[key] for key in self]","function_tokens":["def","values","(","self",")",":","return","[","self","[","key","]","for","key","in","self","]"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L119-L121"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.items","parameters":"(self)","argument_list":"","return_statement":"return [(key, self[key]) for key in self]","docstring":"od.items() -> list of (key, value) pairs in od","docstring_summary":"od.items() -> list of (key, value) pairs in od","docstring_tokens":["od",".","items","()","-",">","list","of","(","key","value",")","pairs","in","od"],"function":"def items(self):\n\t\t'od.items() -> list of (key, value) pairs in od'\n\t\treturn [(key, self[key]) for key in self]","function_tokens":["def","items","(","self",")",":","return","[","(","key",",","self","[","key","]",")","for","key","in","self","]"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L123-L125"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.iterkeys","parameters":"(self)","argument_list":"","return_statement":"return iter(self)","docstring":"od.iterkeys() -> an iterator over the keys in od","docstring_summary":"od.iterkeys() -> an iterator over the keys in od","docstring_tokens":["od",".","iterkeys","()","-",">","an","iterator","over","the","keys","in","od"],"function":"def iterkeys(self):\n\t\t'od.iterkeys() -> an iterator over the keys in od'\n\t\treturn iter(self)","function_tokens":["def","iterkeys","(","self",")",":","return","iter","(","self",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L127-L129"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.itervalues","parameters":"(self)","argument_list":"","return_statement":"","docstring":"od.itervalues -> an iterator over the values in od","docstring_summary":"od.itervalues -> an iterator over the values in od","docstring_tokens":["od",".","itervalues","-",">","an","iterator","over","the","values","in","od"],"function":"def itervalues(self):\n\t\t'od.itervalues -> an iterator over the values in od'\n\t\tfor k in self:\n\t\t\tyield self[k]","function_tokens":["def","itervalues","(","self",")",":","for","k","in","self",":","yield","self","[","k","]"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L131-L134"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.iteritems","parameters":"(self)","argument_list":"","return_statement":"","docstring":"od.iteritems -> an iterator over the (key, value) items in od","docstring_summary":"od.iteritems -> an iterator over the (key, value) items in od","docstring_tokens":["od",".","iteritems","-",">","an","iterator","over","the","(","key","value",")","items","in","od"],"function":"def iteritems(self):\n\t\t'od.iteritems -> an iterator over the (key, value) items in od'\n\t\tfor k in self:\n\t\t\tyield (k, self[k])","function_tokens":["def","iteritems","(","self",")",":","for","k","in","self",":","yield","(","k",",","self","[","k","]",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L136-L139"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.update","parameters":"(*args, **kwds)","argument_list":"","return_statement":"","docstring":"od.update(E, **F) -> None. Update od from dict\/iterable E and F.\n\t\tIf E is a dict instance, does:\t\t for k in E: od[k] = E[k]\n\t\tIf E has a .keys() method, does:\t\t for k in E.keys(): od[k] = E[k]\n\t\tOr if E is an iterable of items, does: for k, v in E: od[k] = v\n\t\tIn either case, this is followed by:\t for k, v in F.items(): od[k] = v","docstring_summary":"od.update(E, **F) -> None. Update od from dict\/iterable E and F.\n\t\tIf E is a dict instance, does:\t\t for k in E: od[k] = E[k]\n\t\tIf E has a .keys() method, does:\t\t for k in E.keys(): od[k] = E[k]\n\t\tOr if E is an iterable of items, does: for k, v in E: od[k] = v\n\t\tIn either case, this is followed by:\t for k, v in F.items(): od[k] = v","docstring_tokens":["od",".","update","(","E","**","F",")","-",">","None",".","Update","od","from","dict","\/","iterable","E","and","F",".","If","E","is","a","dict","instance","does",":","for","k","in","E",":","od","[","k","]","=","E","[","k","]","If","E","has","a",".","keys","()","method","does",":","for","k","in","E",".","keys","()",":","od","[","k","]","=","E","[","k","]","Or","if","E","is","an","iterable","of","items","does",":","for","k","v","in","E",":","od","[","k","]","=","v","In","either","case","this","is","followed","by",":","for","k","v","in","F",".","items","()",":","od","[","k","]","=","v"],"function":"def update(*args, **kwds):\n\t\t'''od.update(E, **F) -> None. Update od from dict\/iterable E and F.\n\t\tIf E is a dict instance, does:\t\t for k in E: od[k] = E[k]\n\t\tIf E has a .keys() method, does:\t\t for k in E.keys(): od[k] = E[k]\n\t\tOr if E is an iterable of items, does: for k, v in E: od[k] = v\n\t\tIn either case, this is followed by:\t for k, v in F.items(): od[k] = v\n\t\t'''\n\t\tif len(args) > 2:\n\t\t\traise TypeError('update() takes at most 2 positional '\n\t\t\t\t\t\t\t'arguments (%d given)' % (len(args),))\n\t\telif not args:\n\t\t\traise TypeError('update() takes at least 1 argument (0 given)')\n\t\tself = args[0]\n\t\t# Make progressively weaker assumptions about \"other\"\n\t\tother = ()\n\t\tif len(args) == 2:\n\t\t\tother = args[1]\n\t\tif isinstance(other, dict):\n\t\t\tfor key in other:\n\t\t\t\tself[key] = other[key]\n\t\telif hasattr(other, 'keys'):\n\t\t\tfor key in other.keys():\n\t\t\t\tself[key] = other[key]\n\t\telse:\n\t\t\tfor key, value in other:\n\t\t\t\tself[key] = value\n\t\tfor key, value in kwds.items():\n\t\t\tself[key] = value","function_tokens":["def","update","(","*","args",",","*","*","kwds",")",":","if","len","(","args",")",">","2",":","raise","TypeError","(","'update() takes at most 2 positional '","'arguments (%d given)'","%","(","len","(","args",")",",",")",")","elif","not","args",":","raise","TypeError","(","'update() takes at least 1 argument (0 given)'",")","self","=","args","[","0","]","# Make progressively weaker assumptions about \"other\"","other","=","(",")","if","len","(","args",")","==","2",":","other","=","args","[","1","]","if","isinstance","(","other",",","dict",")",":","for","key","in","other",":","self","[","key","]","=","other","[","key","]","elif","hasattr","(","other",",","'keys'",")",":","for","key","in","other",".","keys","(",")",":","self","[","key","]","=","other","[","key","]","else",":","for","key",",","value","in","other",":","self","[","key","]","=","value","for","key",",","value","in","kwds",".","items","(",")",":","self","[","key","]","=","value"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L141-L168"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.pop","parameters":"(self, key, default=__marker)","argument_list":"","return_statement":"return default","docstring":"od.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n\t\tIf key is not found, d is returned if given, otherwise KeyError is raised.","docstring_summary":"od.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n\t\tIf key is not found, d is returned if given, otherwise KeyError is raised.","docstring_tokens":["od",".","pop","(","k","[","d","]",")","-",">","v","remove","specified","key","and","return","the","corresponding","value",".","If","key","is","not","found","d","is","returned","if","given","otherwise","KeyError","is","raised","."],"function":"def pop(self, key, default=__marker):\n\t\t'''od.pop(k[,d]) -> v, remove specified key and return the corresponding value.\n\t\tIf key is not found, d is returned if given, otherwise KeyError is raised.\n\t\t'''\n\t\tif key in self:\n\t\t\tresult = self[key]\n\t\t\tdel self[key]\n\t\t\treturn result\n\t\tif default is self.__marker:\n\t\t\traise KeyError(key)\n\t\treturn default","function_tokens":["def","pop","(","self",",","key",",","default","=","__marker",")",":","if","key","in","self",":","result","=","self","[","key","]","del","self","[","key","]","return","result","if","default","is","self",".","__marker",":","raise","KeyError","(","key",")","return","default"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L174-L184"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.setdefault","parameters":"(self, key, default=None)","argument_list":"","return_statement":"return default","docstring":"od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od","docstring_summary":"od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od","docstring_tokens":["od",".","setdefault","(","k","[","d","]",")","-",">","od",".","get","(","k","d",")","also","set","od","[","k","]","=","d","if","k","not","in","od"],"function":"def setdefault(self, key, default=None):\n\t\t'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'\n\t\tif key in self:\n\t\t\treturn self[key]\n\t\tself[key] = default\n\t\treturn default","function_tokens":["def","setdefault","(","self",",","key",",","default","=","None",")",":","if","key","in","self",":","return","self","[","key","]","self","[","key","]","=","default","return","default"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L186-L191"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.__repr__","parameters":"(self, _repr_running={})","argument_list":"","return_statement":"","docstring":"od.__repr__() <==> repr(od)","docstring_summary":"od.__repr__() <==> repr(od)","docstring_tokens":["od",".","__repr__","()","<","==",">","repr","(","od",")"],"function":"def __repr__(self, _repr_running={}):\n\t\t'od.__repr__() <==> repr(od)'\n\t\tcall_key = id(self), _get_ident()\n\t\tif call_key in _repr_running:\n\t\t\treturn '...'\n\t\t_repr_running[call_key] = 1\n\t\ttry:\n\t\t\tif not self:\n\t\t\t\treturn '%s()' % (self.__class__.__name__,)\n\t\t\treturn '%s(%r)' % (self.__class__.__name__, self.items())\n\t\tfinally:\n\t\t\tdel _repr_running[call_key]","function_tokens":["def","__repr__","(","self",",","_repr_running","=","{","}",")",":","call_key","=","id","(","self",")",",","_get_ident","(",")","if","call_key","in","_repr_running",":","return","'...'","_repr_running","[","call_key","]","=","1","try",":","if","not","self",":","return","'%s()'","%","(","self",".","__class__",".","__name__",",",")","return","'%s(%r)'","%","(","self",".","__class__",".","__name__",",","self",".","items","(",")",")","finally",":","del","_repr_running","[","call_key","]"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L193-L204"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.__reduce__","parameters":"(self)","argument_list":"","return_statement":"return self.__class__, (items,)","docstring":"Return state information for pickling","docstring_summary":"Return state information for pickling","docstring_tokens":["Return","state","information","for","pickling"],"function":"def __reduce__(self):\n\t\t'Return state information for pickling'\n\t\titems = [[k, self[k]] for k in self]\n\t\tinst_dict = vars(self).copy()\n\t\tfor k in vars(OrderedDict()):\n\t\t\tinst_dict.pop(k, None)\n\t\tif inst_dict:\n\t\t\treturn (self.__class__, (items,), inst_dict)\n\t\treturn self.__class__, (items,)","function_tokens":["def","__reduce__","(","self",")",":","items","=","[","[","k",",","self","[","k","]","]","for","k","in","self","]","inst_dict","=","vars","(","self",")",".","copy","(",")","for","k","in","vars","(","OrderedDict","(",")",")",":","inst_dict",".","pop","(","k",",","None",")","if","inst_dict",":","return","(","self",".","__class__",",","(","items",",",")",",","inst_dict",")","return","self",".","__class__",",","(","items",",",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L206-L214"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.copy","parameters":"(self)","argument_list":"","return_statement":"return self.__class__(self)","docstring":"od.copy() -> a shallow copy of od","docstring_summary":"od.copy() -> a shallow copy of od","docstring_tokens":["od",".","copy","()","-",">","a","shallow","copy","of","od"],"function":"def copy(self):\n\t\t'od.copy() -> a shallow copy of od'\n\t\treturn self.__class__(self)","function_tokens":["def","copy","(","self",")",":","return","self",".","__class__","(","self",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L216-L218"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.fromkeys","parameters":"(cls, iterable, value=None)","argument_list":"","return_statement":"return d","docstring":"OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S\n\t\tand values equal to v (which defaults to None).","docstring_summary":"OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S\n\t\tand values equal to v (which defaults to None).","docstring_tokens":["OD",".","fromkeys","(","S","[","v","]",")","-",">","New","ordered","dictionary","with","keys","from","S","and","values","equal","to","v","(","which","defaults","to","None",")","."],"function":"def fromkeys(cls, iterable, value=None):\n\t\t'''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S\n\t\tand values equal to v (which defaults to None).\n\t\t'''\n\t\td = cls()\n\t\tfor key in iterable:\n\t\t\td[key] = value\n\t\treturn d","function_tokens":["def","fromkeys","(","cls",",","iterable",",","value","=","None",")",":","d","=","cls","(",")","for","key","in","iterable",":","d","[","key","]","=","value","return","d"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L221-L228"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.__eq__","parameters":"(self, other)","argument_list":"","return_statement":"return dict.__eq__(self, other)","docstring":"od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive\n\t\twhile comparison to a regular mapping is order-insensitive.","docstring_summary":"od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive\n\t\twhile comparison to a regular mapping is order-insensitive.","docstring_tokens":["od",".","__eq__","(","y",")","<","==",">","od","==","y",".","Comparison","to","another","OD","is","order","-","sensitive","while","comparison","to","a","regular","mapping","is","order","-","insensitive","."],"function":"def __eq__(self, other):\n\t\t'''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive\n\t\twhile comparison to a regular mapping is order-insensitive.\n\t\t'''\n\t\tif isinstance(other, OrderedDict):\n\t\t\treturn len(self) == len(other) and self.items() == other.items()\n\t\treturn dict.__eq__(self, other)","function_tokens":["def","__eq__","(","self",",","other",")",":","if","isinstance","(","other",",","OrderedDict",")",":","return","len","(","self",")","==","len","(","other",")","and","self",".","items","(",")","==","other",".","items","(",")","return","dict",".","__eq__","(","self",",","other",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L230-L236"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.viewkeys","parameters":"(self)","argument_list":"","return_statement":"return KeysView(self)","docstring":"od.viewkeys() -> a set-like object providing a view on od's keys","docstring_summary":"od.viewkeys() -> a set-like object providing a view on od's keys","docstring_tokens":["od",".","viewkeys","()","-",">","a","set","-","like","object","providing","a","view","on","od","s","keys"],"function":"def viewkeys(self):\n\t\t\"od.viewkeys() -> a set-like object providing a view on od's keys\"\n\t\treturn KeysView(self)","function_tokens":["def","viewkeys","(","self",")",":","return","KeysView","(","self",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L243-L245"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.viewvalues","parameters":"(self)","argument_list":"","return_statement":"return ValuesView(self)","docstring":"od.viewvalues() -> an object providing a view on od's values","docstring_summary":"od.viewvalues() -> an object providing a view on od's values","docstring_tokens":["od",".","viewvalues","()","-",">","an","object","providing","a","view","on","od","s","values"],"function":"def viewvalues(self):\n\t\t\"od.viewvalues() -> an object providing a view on od's values\"\n\t\treturn ValuesView(self)","function_tokens":["def","viewvalues","(","self",")",":","return","ValuesView","(","self",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L247-L249"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/backport\/OrderedDict.py","language":"python","identifier":"OrderedDict.viewitems","parameters":"(self)","argument_list":"","return_statement":"return ItemsView(self)","docstring":"od.viewitems() -> a set-like object providing a view on od's items","docstring_summary":"od.viewitems() -> a set-like object providing a view on od's items","docstring_tokens":["od",".","viewitems","()","-",">","a","set","-","like","object","providing","a","view","on","od","s","items"],"function":"def viewitems(self):\n\t\t\"od.viewitems() -> a set-like object providing a view on od's items\"\n\t\treturn ItemsView(self)","function_tokens":["def","viewitems","(","self",")",":","return","ItemsView","(","self",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/backport\/OrderedDict.py#L251-L253"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/rest.py","language":"python","identifier":"json_response","parameters":"(request, data, indent=1)","argument_list":"","return_statement":"return json.dumps(data, indent=indent)","docstring":"Create a JSON representation for *data* and set HTTP headers indicating\n that JSON encoded data is returned.\n\n Args:\n request (twisted.web.server.Request): HTTP request object\n data: response content\n indent: indentation level or None\n Returns:\n JSON representation of *data* with appropriate HTTP headers","docstring_summary":"Create a JSON representation for *data* and set HTTP headers indicating\n that JSON encoded data is returned.","docstring_tokens":["Create","a","JSON","representation","for","*","data","*","and","set","HTTP","headers","indicating","that","JSON","encoded","data","is","returned","."],"function":"def json_response(request, data, indent=1):\n \"\"\"\n Create a JSON representation for *data* and set HTTP headers indicating\n that JSON encoded data is returned.\n\n Args:\n request (twisted.web.server.Request): HTTP request object\n data: response content\n indent: indentation level or None\n Returns:\n JSON representation of *data* with appropriate HTTP headers\n \"\"\"\n request.setHeader(\"content-type\", \"application\/json; charset=utf-8\")\n return json.dumps(data, indent=indent)","function_tokens":["def","json_response","(","request",",","data",",","indent","=","1",")",":","request",".","setHeader","(","\"content-type\"",",","\"application\/json; charset=utf-8\"",")","return","json",".","dumps","(","data",",","indent","=","indent",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/rest.py#L29-L42"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/rest.py","language":"python","identifier":"RESTControllerSkeleton.render_OPTIONS","parameters":"(self, request)","argument_list":"","return_statement":"return ''","docstring":"Render response for an HTTP OPTIONS request.\n\n Args:\n request (twisted.web.server.Request): HTTP request object\n Returns:\n HTTP response with headers","docstring_summary":"Render response for an HTTP OPTIONS request.","docstring_tokens":["Render","response","for","an","HTTP","OPTIONS","request","."],"function":"def render_OPTIONS(self, request):\n \"\"\"\n Render response for an HTTP OPTIONS request.\n\n Args:\n request (twisted.web.server.Request): HTTP request object\n Returns:\n HTTP response with headers\n \"\"\"\n for key in self._cors_header:\n request.setHeader(key, self._cors_header[key])\n\n return ''","function_tokens":["def","render_OPTIONS","(","self",",","request",")",":","for","key","in","self",".","_cors_header",":","request",".","setHeader","(","key",",","self",".","_cors_header","[","key","]",")","return","''"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/rest.py#L60-L72"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/rest.py","language":"python","identifier":"RESTControllerSkeleton.render_GET","parameters":"(self, request)","argument_list":"","return_statement":"return json_response(request, data)","docstring":"HTTP GET implementation.\n\n Args:\n request (twisted.web.server.Request): HTTP request object\n Returns:\n HTTP response with headers","docstring_summary":"HTTP GET implementation.","docstring_tokens":["HTTP","GET","implementation","."],"function":"def render_GET(self, request):\n \"\"\"\n HTTP GET implementation.\n\n Args:\n request (twisted.web.server.Request): HTTP request object\n Returns:\n HTTP response with headers\n \"\"\"\n request.setHeader(\n 'Access-Control-Allow-Origin', CORS_DEFAULT_ALLOW_ORIGIN)\n\n data = {\n \"_controller\": self.__class__.__name__,\n \"request_postpath\": request.postpath,\n \"method\": request.method,\n \"request_path\": request.path,\n }\n\n return json_response(request, data)","function_tokens":["def","render_GET","(","self",",","request",")",":","request",".","setHeader","(","'Access-Control-Allow-Origin'",",","CORS_DEFAULT_ALLOW_ORIGIN",")","data","=","{","\"_controller\"",":","self",".","__class__",".","__name__",",","\"request_postpath\"",":","request",".","postpath",",","\"method\"",":","request",".","method",",","\"request_path\"",":","request",".","path",",","}","return","json_response","(","request",",","data",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/rest.py#L74-L93"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/rest.py","language":"python","identifier":"RESTControllerSkeleton.render_POST","parameters":"(self, request)","argument_list":"","return_statement":"return json_response(request, data)","docstring":"HTTP POST implementation.\n\n Args:\n request (twisted.web.server.Request): HTTP request object\n Returns:\n HTTP response with headers","docstring_summary":"HTTP POST implementation.","docstring_tokens":["HTTP","POST","implementation","."],"function":"def render_POST(self, request):\n \"\"\"\n HTTP POST implementation.\n\n Args:\n request (twisted.web.server.Request): HTTP request object\n Returns:\n HTTP response with headers\n \"\"\"\n request.setHeader(\n 'Access-Control-Allow-Origin', CORS_DEFAULT_ALLOW_ORIGIN)\n\n data = {\n \"_controller\": self.__class__.__name__,\n \"request_postpath\": request.postpath,\n \"method\": request.method,\n \"request_path\": request.path,\n }\n\n return json_response(request, data)","function_tokens":["def","render_POST","(","self",",","request",")",":","request",".","setHeader","(","'Access-Control-Allow-Origin'",",","CORS_DEFAULT_ALLOW_ORIGIN",")","data","=","{","\"_controller\"",":","self",".","__class__",".","__name__",",","\"request_postpath\"",":","request",".","postpath",",","\"method\"",":","request",".","method",",","\"request_path\"",":","request",".","path",",","}","return","json_response","(","request",",","data",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/rest.py#L95-L114"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_tsstart","parameters":"(self, request)","argument_list":"","return_statement":"return self.P_tstate(request, success)","docstring":"Request handler for the `tsstart` endpoint.\n\t\tStart timeshift (?).\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `tsstart` endpoint.\n\t\tStart timeshift (?).","docstring_tokens":["Request","handler","for","the","tsstart","endpoint",".","Start","timeshift","(","?",")","."],"function":"def P_tsstart(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `tsstart` endpoint.\n\t\tStart timeshift (?).\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tsuccess = True\n\t\ttry:\n\t\t\tInfoBar.instance.startTimeshift()\n\t\texcept Exception: # nosec # noqa: E722\n\t\t\tsuccess = False\n\t\treturn self.P_tstate(request, success)","function_tokens":["def","P_tsstart","(","self",",","request",")",":","success","=","True","try",":","InfoBar",".","instance",".","startTimeshift","(",")","except","Exception",":","# nosec # noqa: E722","success","=","False","return","self",".","P_tstate","(","request",",","success",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L96-L115"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_tsstop","parameters":"(self, request)","argument_list":"","return_statement":"return self.P_tstate(request, success)","docstring":"Request handler for the `tsstop` endpoint.\n\t\tStop timeshift (?).\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\t*TODO: improve after action \/ save , save+record , nothing\n\t\tconfig.timeshift.favoriteSaveAction ....*\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `tsstop` endpoint.\n\t\tStop timeshift (?).","docstring_tokens":["Request","handler","for","the","tsstop","endpoint",".","Stop","timeshift","(","?",")","."],"function":"def P_tsstop(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `tsstop` endpoint.\n\t\tStop timeshift (?).\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\t*TODO: improve after action \/ save , save+record , nothing\n\t\tconfig.timeshift.favoriteSaveAction ....*\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tsuccess = True\n\t\toldcheck = False\n\t\ttry:\n\t\t\tif comp_config.usage.check_timeshift.value:\n\t\t\t\toldcheck = comp_config.usage.check_timeshift.value\n\t\t\t\t# don't ask but also don't save\n\t\t\t\tcomp_config.usage.check_timeshift.value = False\n\t\t\t\tcomp_config.usage.check_timeshift.save()\n\t\t\tInfoBar.instance.stopTimeshift()\n\t\texcept Exception: # nosec # noqa: E722\n\t\t\tsuccess = False\n\t\tif comp_config.usage.check_timeshift.value:\n\t\t\tcomp_config.usage.check_timeshift.value = oldcheck\n\t\t\tcomp_config.usage.check_timeshift.save()\n\t\treturn self.P_tstate(request, success)","function_tokens":["def","P_tsstop","(","self",",","request",")",":","success","=","True","oldcheck","=","False","try",":","if","comp_config",".","usage",".","check_timeshift",".","value",":","oldcheck","=","comp_config",".","usage",".","check_timeshift",".","value","# don't ask but also don't save","comp_config",".","usage",".","check_timeshift",".","value","=","False","comp_config",".","usage",".","check_timeshift",".","save","(",")","InfoBar",".","instance",".","stopTimeshift","(",")","except","Exception",":","# nosec # noqa: E722","success","=","False","if","comp_config",".","usage",".","check_timeshift",".","value",":","comp_config",".","usage",".","check_timeshift",".","value","=","oldcheck","comp_config",".","usage",".","check_timeshift",".","save","(",")","return","self",".","P_tstate","(","request",",","success",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L117-L148"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_tsstate","parameters":"(self, request, success=True)","argument_list":"","return_statement":"return {\n\t\t\t\"state\": success,\n\t\t\t\"timeshiftEnabled\": InfoBar.instance.timeshiftEnabled()\n\t\t}","docstring":"Request handler for the `tsstate` endpoint.\n\t\tRetrieve timeshift status(?).\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `tsstate` endpoint.\n\t\tRetrieve timeshift status(?).","docstring_tokens":["Request","handler","for","the","tsstate","endpoint",".","Retrieve","timeshift","status","(","?",")","."],"function":"def P_tsstate(self, request, success=True):\n\t\t\"\"\"\n\t\tRequest handler for the `tsstate` endpoint.\n\t\tRetrieve timeshift status(?).\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn {\n\t\t\t\"state\": success,\n\t\t\t\"timeshiftEnabled\": InfoBar.instance.timeshiftEnabled()\n\t\t}","function_tokens":["def","P_tsstate","(","self",",","request",",","success","=","True",")",":","return","{","\"state\"",":","success",",","\"timeshiftEnabled\"",":","InfoBar",".","instance",".","timeshiftEnabled","(",")","}"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L150-L167"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_about","parameters":"(self, request)","argument_list":"","return_statement":"return {\n\t\t\t\"info\": getInfo(self.session, need_fullinfo=True),\n\t\t\t\"service\": getCurrentService(self.session)\n\t\t}","docstring":"Request handler for the `about` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#about\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `about` endpoint.","docstring_tokens":["Request","handler","for","the","about","endpoint","."],"function":"def P_about(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `about` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#about\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn {\n\t\t\t\"info\": getInfo(self.session, need_fullinfo=True),\n\t\t\t\"service\": getCurrentService(self.session)\n\t\t}","function_tokens":["def","P_about","(","self",",","request",")",":","return","{","\"info\"",":","getInfo","(","self",".","session",",","need_fullinfo","=","True",")",",","\"service\"",":","getCurrentService","(","self",".","session",")","}"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L169-L185"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_tunersignal","parameters":"(self, request)","argument_list":"","return_statement":"return getFrontendStatus(self.session)","docstring":"Request handler for the `tunersignal` endpoint.\n\t\tGet tuner signal status(?)\n\n\t\t.. seealso::\n\n\t\t\tProbably https:\/\/dream.reichholf.net\/e2web\/#signal\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/signal","docstring_summary":"Request handler for the `tunersignal` endpoint.\n\t\tGet tuner signal status(?)","docstring_tokens":["Request","handler","for","the","tunersignal","endpoint",".","Get","tuner","signal","status","(","?",")"],"function":"def P_tunersignal(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `tunersignal` endpoint.\n\t\tGet tuner signal status(?)\n\n\t\t.. seealso::\n\n\t\t\tProbably https:\/\/dream.reichholf.net\/e2web\/#signal\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/signal\n\t\t\"\"\"\n\t\treturn getFrontendStatus(self.session)","function_tokens":["def","P_tunersignal","(","self",",","request",")",":","return","getFrontendStatus","(","self",".","session",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L195-L211"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_vol","parameters":"(self, request)","argument_list":"","return_statement":"return res","docstring":"Request handler for the `vol` endpoint.\n\t\tGet\/Set current volume setting.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#vol\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `vol` endpoint.\n\t\tGet\/Set current volume setting.","docstring_tokens":["Request","handler","for","the","vol","endpoint",".","Get","\/","Set","current","volume","setting","."],"function":"def P_vol(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `vol` endpoint.\n\t\tGet\/Set current volume setting.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#vol\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tset = getUrlArg(request, \"set\")\n\t\tif set == None or set == \"state\":\n\t\t\treturn getVolumeStatus()\n\t\telif set == \"up\":\n\t\t\treturn setVolumeUp()\n\t\telif set == \"down\":\n\t\t\treturn setVolumeDown()\n\t\telif set == \"mute\":\n\t\t\treturn setVolumeMute()\n\t\telif set[:3] == \"set\":\n\t\t\ttry:\n\t\t\t\treturn setVolume(int(set[3:]))\n\t\t\texcept Exception: # nosec # noqa: E722\n\t\t\t\tres = getVolumeStatus()\n\t\t\t\tres[\"result\"] = False\n\t\t\t\tres[\"message\"] = _(\"Wrong parameter format 'set=%s'. Use set=set15 \") % set\n\t\t\t\treturn res\n\n\t\tres = getVolumeStatus()\n\t\tres[\"result\"] = False\n\t\tres[\"message\"] = _(\"Unknown Volume command %s\") % set\n\t\treturn res","function_tokens":["def","P_vol","(","self",",","request",")",":","set","=","getUrlArg","(","request",",","\"set\"",")","if","set","==","None","or","set","==","\"state\"",":","return","getVolumeStatus","(",")","elif","set","==","\"up\"",":","return","setVolumeUp","(",")","elif","set","==","\"down\"",":","return","setVolumeDown","(",")","elif","set","==","\"mute\"",":","return","setVolumeMute","(",")","elif","set","[",":","3","]","==","\"set\"",":","try",":","return","setVolume","(","int","(","set","[","3",":","]",")",")","except","Exception",":","# nosec # noqa: E722","res","=","getVolumeStatus","(",")","res","[","\"result\"","]","=","False","res","[","\"message\"","]","=","_","(","\"Wrong parameter format 'set=%s'. Use set=set15 \"",")","%","set","return","res","res","=","getVolumeStatus","(",")","res","[","\"result\"","]","=","False","res","[","\"message\"","]","=","_","(","\"Unknown Volume command %s\"",")","%","set","return","res"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L213-L248"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_getaudiotracks","parameters":"(self, request)","argument_list":"","return_statement":"return getAudioTracks(self.session)","docstring":"Request handler for the `\/getaudiotracks` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getaudiotracks\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `\/getaudiotracks` endpoint.","docstring_tokens":["Request","handler","for","the","\/","getaudiotracks","endpoint","."],"function":"def P_getaudiotracks(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `\/getaudiotracks` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getaudiotracks\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getAudioTracks(self.session)","function_tokens":["def","P_getaudiotracks","(","self",",","request",")",":","return","getAudioTracks","(","self",".","session",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L250-L263"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_selectaudiotrack","parameters":"(self, request)","argument_list":"","return_statement":"return setAudioTrack(self.session, id)","docstring":"Request handler for the `\/selectaudiotrack` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#selectaudiotrack\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/signal\n\n\t\t\t:query int id: audio track ID","docstring_summary":"Request handler for the `\/selectaudiotrack` endpoint.","docstring_tokens":["Request","handler","for","the","\/","selectaudiotrack","endpoint","."],"function":"def P_selectaudiotrack(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `\/selectaudiotrack` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#selectaudiotrack\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/signal\n\n\t\t\t:query int id: audio track ID\n\t\t\"\"\"\n\t\ttry:\n\t\t\tid = int(request.args[b\"id\"][0])\n\t\texcept Exception: # nosec # noqa: E722\n\t\t\tid = -1\n\n\t\treturn setAudioTrack(self.session, id)","function_tokens":["def","P_selectaudiotrack","(","self",",","request",")",":","try",":","id","=","int","(","request",".","args","[","b\"id\"","]","[","0","]",")","except","Exception",":","# nosec # noqa: E722","id","=","-","1","return","setAudioTrack","(","self",".","session",",","id",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L265-L287"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_zap","parameters":"(self, request)","argument_list":"","return_statement":"return zapService(self.session, sRef, title)","docstring":"Request handler for the `\/zap` endpoint.\n\t\tZap to requested service_reference.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#zap\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/zap\n\n\t\t\t:query string sRef: service reference\n\t\t\t:query string title: service title","docstring_summary":"Request handler for the `\/zap` endpoint.\n\t\tZap to requested service_reference.","docstring_tokens":["Request","handler","for","the","\/","zap","endpoint",".","Zap","to","requested","service_reference","."],"function":"def P_zap(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `\/zap` endpoint.\n\t\tZap to requested service_reference.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#zap\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/zap\n\n\t\t\t:query string sRef: service reference\n\t\t\t:query string title: service title\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"sRef\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\ttitle = getUrlArg(request, \"title\", \"\")\n\t\tsRef = getUrlArg(request, \"sRef\")\n\t\treturn zapService(self.session, sRef, title)","function_tokens":["def","P_zap","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"sRef\"","]",")","if","res",":","return","res","title","=","getUrlArg","(","request",",","\"title\"",",","\"\"",")","sRef","=","getUrlArg","(","request",",","\"sRef\"",")","return","zapService","(","self",".","session",",","sRef",",","title",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L289-L314"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_remotecontrol","parameters":"(self, request)","argument_list":"","return_statement":"return remoteControl(id, type, rcu)","docstring":"Request handler for the `remotecontrol` endpoint.\n\t\tSend remote control codes.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#remotecontrol\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `remotecontrol` endpoint.\n\t\tSend remote control codes.","docstring_tokens":["Request","handler","for","the","remotecontrol","endpoint",".","Send","remote","control","codes","."],"function":"def P_remotecontrol(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `remotecontrol` endpoint.\n\t\tSend remote control codes.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#remotecontrol\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\n\t\ttext = getUrlArg(request, \"text\", \"\")\n\t\tif text:\n\t\t\treturn remoteControl(0, \"text\", text) # text input do not need type and command\n\n\t\tres = self.testMandatoryArguments(request, [\"command\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\tid = -1\n\t\ttry:\n\t\t\tid = int(request.args[b\"command\"][0])\n\t\texcept Exception: # nosec # noqa: E722\n\t\t\treturn {\n\t\t\t\t\"result\": False,\n\t\t\t\t\"message\": _(\"The parameter 'command' must be a number\")\n\t\t\t}\n\n\t\ttype = getUrlArg(request, \"type\", \"\")\n\t\trcu = getUrlArg(request, \"rcu\", \"\")\n\n\t\treturn remoteControl(id, type, rcu)","function_tokens":["def","P_remotecontrol","(","self",",","request",")",":","text","=","getUrlArg","(","request",",","\"text\"",",","\"\"",")","if","text",":","return","remoteControl","(","0",",","\"text\"",",","text",")","# text input do not need type and command","res","=","self",".","testMandatoryArguments","(","request",",","[","\"command\"","]",")","if","res",":","return","res","id","=","-","1","try",":","id","=","int","(","request",".","args","[","b\"command\"","]","[","0","]",")","except","Exception",":","# nosec # noqa: E722","return","{","\"result\"",":","False",",","\"message\"",":","_","(","\"The parameter 'command' must be a number\"",")","}","type","=","getUrlArg","(","request",",","\"type\"",",","\"\"",")","rcu","=","getUrlArg","(","request",",","\"rcu\"",",","\"\"",")","return","remoteControl","(","id",",","type",",","rcu",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L316-L351"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_powerstate","parameters":"(self, request)","argument_list":"","return_statement":"return getStandbyState(self.session)","docstring":"Request handler for the `powerstate` endpoint.\n\t\tGet\/set power state of enigma2 device.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#powerstate\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `powerstate` endpoint.\n\t\tGet\/set power state of enigma2 device.","docstring_tokens":["Request","handler","for","the","powerstate","endpoint",".","Get","\/","set","power","state","of","enigma2","device","."],"function":"def P_powerstate(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `powerstate` endpoint.\n\t\tGet\/set power state of enigma2 device.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#powerstate\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tif b\"shift\" in list(request.args.keys()):\n\t\t\tself.P_set_powerup_without_waking_tv(request)\n\t\tnewstate = getUrlArg(request, \"newstate\")\n\t\tif newstate != None:\n\t\t\treturn setPowerState(self.session, newstate)\n\t\treturn getStandbyState(self.session)","function_tokens":["def","P_powerstate","(","self",",","request",")",":","if","b\"shift\"","in","list","(","request",".","args",".","keys","(",")",")",":","self",".","P_set_powerup_without_waking_tv","(","request",")","newstate","=","getUrlArg","(","request",",","\"newstate\"",")","if","newstate","!=","None",":","return","setPowerState","(","self",".","session",",","newstate",")","return","getStandbyState","(","self",".","session",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L353-L372"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_supports_powerup_without_waking_tv","parameters":"(self, request)","argument_list":"","return_statement":"","docstring":"Request handler for the `supports_powerup_without_waking_tv` endpoint.\n\t\tCheck if 'powerup without waking TV' is available.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `supports_powerup_without_waking_tv` endpoint.\n\t\tCheck if 'powerup without waking TV' is available.","docstring_tokens":["Request","handler","for","the","supports_powerup_without_waking_tv","endpoint",".","Check","if","powerup","without","waking","TV","is","available","."],"function":"def P_supports_powerup_without_waking_tv(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `supports_powerup_without_waking_tv` endpoint.\n\t\tCheck if 'powerup without waking TV' is available.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\ttry:\n\t\t\t# returns 'True' if the image supports the function \"Power on without TV\":\n\t\t\tf = open(\"\/tmp\/powerup_without_waking_tv.txt\", \"r\") # nosec\n\t\t\tpowerupWithoutWakingTv = f.read()\n\t\t\tf.close()\n\t\t\tif ((powerupWithoutWakingTv == 'True') or (powerupWithoutWakingTv == 'False')):\n\t\t\t\treturn True\n\t\t\telse:\n\t\t\t\treturn False\n\t\texcept: # nosec # noqa: E722\n\t\t\treturn False","function_tokens":["def","P_supports_powerup_without_waking_tv","(","self",",","request",")",":","try",":","# returns 'True' if the image supports the function \"Power on without TV\":","f","=","open","(","\"\/tmp\/powerup_without_waking_tv.txt\"",",","\"r\"",")","# nosec","powerupWithoutWakingTv","=","f",".","read","(",")","f",".","close","(",")","if","(","(","powerupWithoutWakingTv","==","'True'",")","or","(","powerupWithoutWakingTv","==","'False'",")",")",":","return","True","else",":","return","False","except",":","# nosec # noqa: E722","return","False"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L374-L398"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_set_powerup_without_waking_tv","parameters":"(self, request)","argument_list":"","return_statement":"","docstring":"Request handler for the `set_powerup_without_waking_tv` endpoint.\n\t\tMark 'powerup without waking TV' being available.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `set_powerup_without_waking_tv` endpoint.\n\t\tMark 'powerup without waking TV' being available.","docstring_tokens":["Request","handler","for","the","set_powerup_without_waking_tv","endpoint",".","Mark","powerup","without","waking","TV","being","available","."],"function":"def P_set_powerup_without_waking_tv(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `set_powerup_without_waking_tv` endpoint.\n\t\tMark 'powerup without waking TV' being available.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tif self.P_supports_powerup_without_waking_tv(request):\n\t\t\ttry:\n\t\t\t\t# write \"True\" to file so that the box will power on ONCE skipping the HDMI-CEC communication:\n\t\t\t\tf = open(\"\/tmp\/powerup_without_waking_tv.txt\", \"w\") # nosec\n\t\t\t\tf.write('True')\n\t\t\t\tf.close()\n\t\t\t\treturn True\n\t\t\texcept: # nosec # noqa: E722\n\t\t\t\treturn False\n\t\telse:\n\t\t\treturn False","function_tokens":["def","P_set_powerup_without_waking_tv","(","self",",","request",")",":","if","self",".","P_supports_powerup_without_waking_tv","(","request",")",":","try",":","# write \"True\" to file so that the box will power on ONCE skipping the HDMI-CEC communication:","f","=","open","(","\"\/tmp\/powerup_without_waking_tv.txt\"",",","\"w\"",")","# nosec","f",".","write","(","'True'",")","f",".","close","(",")","return","True","except",":","# nosec # noqa: E722","return","False","else",":","return","False"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L400-L424"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_getlocations","parameters":"(self, request)","argument_list":"","return_statement":"return getLocations()","docstring":"Request handler for the `getlocations` endpoint.\n\t\tRetrieve paths where video files are stored.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getlocations\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `getlocations` endpoint.\n\t\tRetrieve paths where video files are stored.","docstring_tokens":["Request","handler","for","the","getlocations","endpoint",".","Retrieve","paths","where","video","files","are","stored","."],"function":"def P_getlocations(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `getlocations` endpoint.\n\t\tRetrieve paths where video files are stored.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getlocations\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getLocations()","function_tokens":["def","P_getlocations","(","self",",","request",")",":","return","getLocations","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L426-L440"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_getcurrlocation","parameters":"(self, request)","argument_list":"","return_statement":"return getCurrentLocation()","docstring":"Request handler for the `getcurrlocation` endpoint.\n\t\tGet currently selected path where video files are to be stored.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getcurrlocation\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `getcurrlocation` endpoint.\n\t\tGet currently selected path where video files are to be stored.","docstring_tokens":["Request","handler","for","the","getcurrlocation","endpoint",".","Get","currently","selected","path","where","video","files","are","to","be","stored","."],"function":"def P_getcurrlocation(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `getcurrlocation` endpoint.\n\t\tGet currently selected path where video files are to be stored.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getcurrlocation\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getCurrentLocation()","function_tokens":["def","P_getcurrlocation","(","self",",","request",")",":","return","getCurrentLocation","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L442-L456"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_getallservices","parameters":"(self, request)","argument_list":"","return_statement":"return bouquets","docstring":"Request handler for the `getallservices` endpoint.\n\t\tRetrieve list of services in bouquets.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getallservices\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `getallservices` endpoint.\n\t\tRetrieve list of services in bouquets.","docstring_tokens":["Request","handler","for","the","getallservices","endpoint",".","Retrieve","list","of","services","in","bouquets","."],"function":"def P_getallservices(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `getallservices` endpoint.\n\t\tRetrieve list of services in bouquets.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getallservices\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\ttype = \"tv\"\n\t\tif b\"type\" in list(request.args.keys()):\n\t\t\ttype = \"radio\"\n\t\tnoiptv = False\n\t\tif b\"noiptv\" in list(request.args.keys()):\n\t\t\tnoiptv = True\n\t\tnolastscanned = False\n\t\tif b\"nolastscanned\" in list(request.args.keys()):\n\t\t\tnolastscanned = True\n\t\tbouquets = getAllServices(type, noiptv, nolastscanned)\n\t\tif b\"renameserviceforxmbc\" in list(request.args.keys()):\n\t\t\tfor bouquet in bouquets[\"services\"]:\n\t\t\t\tfor service in bouquet[\"subservices\"]:\n\t\t\t\t\tif not int(service[\"servicereference\"].split(\":\")[1]) & 64:\n\t\t\t\t\t\tservice[\"servicename\"] = \"%d - %s\" % (service[\"pos\"], service[\"servicename\"])\n\t\t\treturn bouquets\n\t\treturn bouquets","function_tokens":["def","P_getallservices","(","self",",","request",")",":","type","=","\"tv\"","if","b\"type\"","in","list","(","request",".","args",".","keys","(",")",")",":","type","=","\"radio\"","noiptv","=","False","if","b\"noiptv\"","in","list","(","request",".","args",".","keys","(",")",")",":","noiptv","=","True","nolastscanned","=","False","if","b\"nolastscanned\"","in","list","(","request",".","args",".","keys","(",")",")",":","nolastscanned","=","True","bouquets","=","getAllServices","(","type",",","noiptv",",","nolastscanned",")","if","b\"renameserviceforxmbc\"","in","list","(","request",".","args",".","keys","(",")",")",":","for","bouquet","in","bouquets","[","\"services\"","]",":","for","service","in","bouquet","[","\"subservices\"","]",":","if","not","int","(","service","[","\"servicereference\"","]",".","split","(","\":\"",")","[","1","]",")","&","64",":","service","[","\"servicename\"","]","=","\"%d - %s\"","%","(","service","[","\"pos\"","]",",","service","[","\"servicename\"","]",")","return","bouquets","return","bouquets"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L458-L488"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_getservices","parameters":"(self, request)","argument_list":"","return_statement":"return getServices(sRef=sRef, showAll=True, showHidden=hidden, provider=provider, picon=picon)","docstring":"Request handler for the `getservices` endpoint.\n\t\tRetrieve list of bouquets.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getservices\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `getservices` endpoint.\n\t\tRetrieve list of bouquets.","docstring_tokens":["Request","handler","for","the","getservices","endpoint",".","Retrieve","list","of","bouquets","."],"function":"def P_getservices(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `getservices` endpoint.\n\t\tRetrieve list of bouquets.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getservices\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tsRef = getUrlArg(request, \"sRef\", \"\")\n\t\thidden = getUrlArg(request, \"hidden\") == \"1\"\n\t\tprovider = getUrlArg(request, \"provider\") == \"1\"\n\t\tpicon = getUrlArg(request, \"picon\") == \"1\"\n\t\treturn getServices(sRef=sRef, showAll=True, showHidden=hidden, provider=provider, picon=picon)","function_tokens":["def","P_getservices","(","self",",","request",")",":","sRef","=","getUrlArg","(","request",",","\"sRef\"",",","\"\"",")","hidden","=","getUrlArg","(","request",",","\"hidden\"",")","==","\"1\"","provider","=","getUrlArg","(","request",",","\"provider\"",")","==","\"1\"","picon","=","getUrlArg","(","request",",","\"picon\"",")","==","\"1\"","return","getServices","(","sRef","=","sRef",",","showAll","=","True",",","showHidden","=","hidden",",","provider","=","provider",",","picon","=","picon",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L490-L508"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_servicesxspf","parameters":"(self, request)","argument_list":"","return_statement":"return services","docstring":"Request handler for the `servicesxspf` endpoint.\n\t\tRetrieve list of bouquets(?) in XSPF format.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/services.xspf\n\n\t\t\t:query string bRef: bouquet reference","docstring_summary":"Request handler for the `servicesxspf` endpoint.\n\t\tRetrieve list of bouquets(?) in XSPF format.","docstring_tokens":["Request","handler","for","the","servicesxspf","endpoint",".","Retrieve","list","of","bouquets","(","?",")","in","XSPF","format","."],"function":"def P_servicesxspf(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `servicesxspf` endpoint.\n\t\tRetrieve list of bouquets(?) in XSPF format.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/services.xspf\n\n\t\t\t:query string bRef: bouquet reference\n\t\t\"\"\"\n\t\tbRef = getUrlArg(request, \"bRef\", \"\")\n\t\trequest.setHeader('Content-Type', 'application\/xspf+xml')\n\t\tbouquetName = getUrlArg(request, \"bName\")\n\t\tif bouquetName != None:\n\t\t\tbouquetName = bouquetName.replace(\",\", \"_\").replace(\";\", \"_\")\n\t\t\trequest.setHeader('Content-Disposition', 'inline; filename=%s.%s;' % (bouquetName, 'xspf'))\n\t\tservices = getServices(bRef, False)\n\t\tif comp_config.OpenWebif.auth_for_streaming.value:\n\t\t\tsession = GetSession()\n\t\t\tif session.GetAuth(request) is not None:\n\t\t\t\tauth = ':'.join(session.GetAuth(request)) + \"@\"\n\t\t\telse:\n\t\t\t\tauth = '-sid:' + str(session.GetSID(request)) + \"@\"\n\t\telse:\n\t\t\tauth = ''\n\t\tportNumber = comp_config.OpenWebif.streamport.value\n\t\tservices[\"host\"] = \"%s:%s\" % (request.getRequestHostname(), portNumber)\n\t\tservices[\"auth\"] = auth\n\t\tservices[\"bname\"] = bouquetName\n\t\treturn services","function_tokens":["def","P_servicesxspf","(","self",",","request",")",":","bRef","=","getUrlArg","(","request",",","\"bRef\"",",","\"\"",")","request",".","setHeader","(","'Content-Type'",",","'application\/xspf+xml'",")","bouquetName","=","getUrlArg","(","request",",","\"bName\"",")","if","bouquetName","!=","None",":","bouquetName","=","bouquetName",".","replace","(","\",\"",",","\"_\"",")",".","replace","(","\";\"",",","\"_\"",")","request",".","setHeader","(","'Content-Disposition'",",","'inline; filename=%s.%s;'","%","(","bouquetName",",","'xspf'",")",")","services","=","getServices","(","bRef",",","False",")","if","comp_config",".","OpenWebif",".","auth_for_streaming",".","value",":","session","=","GetSession","(",")","if","session",".","GetAuth","(","request",")","is","not","None",":","auth","=","':'",".","join","(","session",".","GetAuth","(","request",")",")","+","\"@\"","else",":","auth","=","'-sid:'","+","str","(","session",".","GetSID","(","request",")",")","+","\"@\"","else",":","auth","=","''","portNumber","=","comp_config",".","OpenWebif",".","streamport",".","value","services","[","\"host\"","]","=","\"%s:%s\"","%","(","request",".","getRequestHostname","(",")",",","portNumber",")","services","[","\"auth\"","]","=","auth","services","[","\"bname\"","]","=","bouquetName","return","services"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L510-L543"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_servicesm3u","parameters":"(self, request)","argument_list":"","return_statement":"return services","docstring":"Request handler for the `servicesm3u` endpoint.\n\t\tRetrieve list of bouquets(?) in M3U format.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#services.m3u\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/services.m3u\n\n\t\t\t:query string bRef: bouquet reference","docstring_summary":"Request handler for the `servicesm3u` endpoint.\n\t\tRetrieve list of bouquets(?) in M3U format.","docstring_tokens":["Request","handler","for","the","servicesm3u","endpoint",".","Retrieve","list","of","bouquets","(","?",")","in","M3U","format","."],"function":"def P_servicesm3u(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `servicesm3u` endpoint.\n\t\tRetrieve list of bouquets(?) in M3U format.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#services.m3u\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/services.m3u\n\n\t\t\t:query string bRef: bouquet reference\n\t\t\"\"\"\n\t\tbRef = getUrlArg(request, \"bRef\", \"\")\n\t\trequest.setHeader('Content-Type', 'application\/x-mpegurl')\n\t\tbouquetName = getUrlArg(request, \"bName\")\n\t\tif bouquetName != None:\n\t\t\tbouquetName = bouquetName.replace(\",\", \"_\").replace(\";\", \"_\")\n\t\t\trequest.setHeader('Content-Disposition', 'inline; filename=%s.%s;' % (bouquetName, 'm3u8'))\n\t\tservices = getServices(bRef, False)\n\t\tif comp_config.OpenWebif.auth_for_streaming.value:\n\t\t\tsession = GetSession()\n\t\t\tif session.GetAuth(request) is not None:\n\t\t\t\tauth = ':'.join(session.GetAuth(request)) + \"@\"\n\t\t\telse:\n\t\t\t\tauth = '-sid:' + str(session.GetSID(request)) + \"@\"\n\t\telse:\n\t\t\tauth = ''\n\t\tportNumber = comp_config.OpenWebif.streamport.value\n\t\tservices[\"host\"] = \"%s:%s\" % (request.getRequestHostname(), portNumber)\n\t\tservices[\"auth\"] = auth\n\t\treturn services","function_tokens":["def","P_servicesm3u","(","self",",","request",")",":","bRef","=","getUrlArg","(","request",",","\"bRef\"",",","\"\"",")","request",".","setHeader","(","'Content-Type'",",","'application\/x-mpegurl'",")","bouquetName","=","getUrlArg","(","request",",","\"bName\"",")","if","bouquetName","!=","None",":","bouquetName","=","bouquetName",".","replace","(","\",\"",",","\"_\"",")",".","replace","(","\";\"",",","\"_\"",")","request",".","setHeader","(","'Content-Disposition'",",","'inline; filename=%s.%s;'","%","(","bouquetName",",","'m3u8'",")",")","services","=","getServices","(","bRef",",","False",")","if","comp_config",".","OpenWebif",".","auth_for_streaming",".","value",":","session","=","GetSession","(",")","if","session",".","GetAuth","(","request",")","is","not","None",":","auth","=","':'",".","join","(","session",".","GetAuth","(","request",")",")","+","\"@\"","else",":","auth","=","'-sid:'","+","str","(","session",".","GetSID","(","request",")",")","+","\"@\"","else",":","auth","=","''","portNumber","=","comp_config",".","OpenWebif",".","streamport",".","value","services","[","\"host\"","]","=","\"%s:%s\"","%","(","request",".","getRequestHostname","(",")",",","portNumber",")","services","[","\"auth\"","]","=","auth","return","services"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L545-L581"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_subservices","parameters":"(self, request)","argument_list":"","return_statement":"return getSubServices(self.session)","docstring":"Request handler for the `subservices` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#subservices\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `subservices` endpoint.","docstring_tokens":["Request","handler","for","the","subservices","endpoint","."],"function":"def P_subservices(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `subservices` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#subservices\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getSubServices(self.session)","function_tokens":["def","P_subservices","(","self",",","request",")",":","return","getSubServices","(","self",".","session",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L583-L596"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_parentcontrollist","parameters":"(self, request)","argument_list":"","return_statement":"return getParentalControlList()","docstring":"Request handler for the `parentcontrollist` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#parentcontrollist\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `parentcontrollist` endpoint.","docstring_tokens":["Request","handler","for","the","parentcontrollist","endpoint","."],"function":"def P_parentcontrollist(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `parentcontrollist` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#parentcontrollist\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getParentalControlList()","function_tokens":["def","P_parentcontrollist","(","self",",","request",")",":","return","getParentalControlList","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L598-L611"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_servicelistplayable","parameters":"(self, request)","argument_list":"","return_statement":"return getPlayableServices(sRef, sRefPlaying)","docstring":"Request handler for the `servicelistplayable` endpoint.\n\t\tRetrieve list of 'playable' bouquets.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#servicelistplayable\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `servicelistplayable` endpoint.\n\t\tRetrieve list of 'playable' bouquets.","docstring_tokens":["Request","handler","for","the","servicelistplayable","endpoint",".","Retrieve","list","of","playable","bouquets","."],"function":"def P_servicelistplayable(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `servicelistplayable` endpoint.\n\t\tRetrieve list of 'playable' bouquets.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#servicelistplayable\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tsRef = getUrlArg(request, \"sRef\", \"\")\n\t\tsRefPlaying = getUrlArg(request, \"sRefPlaying\", \"\")\n\t\treturn getPlayableServices(sRef, sRefPlaying)","function_tokens":["def","P_servicelistplayable","(","self",",","request",")",":","sRef","=","getUrlArg","(","request",",","\"sRef\"",",","\"\"",")","sRefPlaying","=","getUrlArg","(","request",",","\"sRefPlaying\"",",","\"\"",")","return","getPlayableServices","(","sRef",",","sRefPlaying",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L613-L629"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_serviceplayable","parameters":"(self, request)","argument_list":"","return_statement":"return getPlayableService(sRef, sRefPlaying)","docstring":"Request handler for the `serviceplayable` endpoint.\n\t\tCheck if referenced service is 'playable'.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#serviceplayable\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `serviceplayable` endpoint.\n\t\tCheck if referenced service is 'playable'.","docstring_tokens":["Request","handler","for","the","serviceplayable","endpoint",".","Check","if","referenced","service","is","playable","."],"function":"def P_serviceplayable(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `serviceplayable` endpoint.\n\t\tCheck if referenced service is 'playable'.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#serviceplayable\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tsRef = getUrlArg(request, \"sRef\", \"\")\n\t\tsRefPlaying = getUrlArg(request, \"sRefPlaying\", \"\")\n\t\treturn getPlayableService(sRef, sRefPlaying)","function_tokens":["def","P_serviceplayable","(","self",",","request",")",":","sRef","=","getUrlArg","(","request",",","\"sRef\"",",","\"\"",")","sRefPlaying","=","getUrlArg","(","request",",","\"sRefPlaying\"",",","\"\"",")","return","getPlayableService","(","sRef",",","sRefPlaying",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L631-L647"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_addlocation","parameters":"(self, request)","argument_list":"","return_statement":"return addLocation(dirname, create)","docstring":"Request handler for the `addlocation` endpoint.\n\t\tAdd a path to the list of paths where video files are stored.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#addlocation\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `addlocation` endpoint.\n\t\tAdd a path to the list of paths where video files are stored.","docstring_tokens":["Request","handler","for","the","addlocation","endpoint",".","Add","a","path","to","the","list","of","paths","where","video","files","are","stored","."],"function":"def P_addlocation(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `addlocation` endpoint.\n\t\tAdd a path to the list of paths where video files are stored.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#addlocation\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"dirname\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\tdirname = getUrlArg(request, \"dirname\")\n\t\tcreate = getUrlArg(request, \"createFolder\") == \"1\"\n\t\treturn addLocation(dirname, create)","function_tokens":["def","P_addlocation","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"dirname\"","]",")","if","res",":","return","res","dirname","=","getUrlArg","(","request",",","\"dirname\"",")","create","=","getUrlArg","(","request",",","\"createFolder\"",")","==","\"1\"","return","addLocation","(","dirname",",","create",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L649-L669"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_removelocation","parameters":"(self, request)","argument_list":"","return_statement":"return removeLocation(dirname, remove)","docstring":"Request handler for the `removelocation` endpoint.\n\t\tRemove a path from the list of paths where video files are stored.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#removelocation\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `removelocation` endpoint.\n\t\tRemove a path from the list of paths where video files are stored.","docstring_tokens":["Request","handler","for","the","removelocation","endpoint",".","Remove","a","path","from","the","list","of","paths","where","video","files","are","stored","."],"function":"def P_removelocation(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `removelocation` endpoint.\n\t\tRemove a path from the list of paths where video files are stored.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#removelocation\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"dirname\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\tdirname = getUrlArg(request, \"dirname\")\n\t\tremove = getUrlArg(request, \"removeFolder\") == \"1\"\n\t\treturn removeLocation(dirname, remove)","function_tokens":["def","P_removelocation","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"dirname\"","]",")","if","res",":","return","res","dirname","=","getUrlArg","(","request",",","\"dirname\"",")","remove","=","getUrlArg","(","request",",","\"removeFolder\"",")","==","\"1\"","return","removeLocation","(","dirname",",","remove",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L671-L691"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_message","parameters":"(self, request)","argument_list":"","return_statement":"return sendMessage(self.session, text, ttype, timeout)","docstring":"Request handler for the `message` endpoint.\n\t\tDisplay a message on the screen attached to enigma2 device.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#message\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `message` endpoint.\n\t\tDisplay a message on the screen attached to enigma2 device.","docstring_tokens":["Request","handler","for","the","message","endpoint",".","Display","a","message","on","the","screen","attached","to","enigma2","device","."],"function":"def P_message(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `message` endpoint.\n\t\tDisplay a message on the screen attached to enigma2 device.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#message\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"text\", \"type\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\ttry:\n\t\t\tttype = int(request.args[b\"type\"][0])\n\t\texcept ValueError:\n\t\t\treturn {\n\t\t\t\t\"result\": False,\n\t\t\t\t\"message\": _(\"type %s is not a number\") % request.args[b\"type\"][0]\n\t\t\t}\n\n\t\ttimeout = -1\n\t\tif b\"timeout\" in list(request.args.keys()):\n\t\t\ttry:\n\t\t\t\ttimeout = int(request.args[b\"timeout\"][0])\n\t\t\texcept ValueError:\n\t\t\t\tpass\n\n\t\ttext = getUrlArg(request, \"text\")\n\t\treturn sendMessage(self.session, text, ttype, timeout)","function_tokens":["def","P_message","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"text\"",",","\"type\"","]",")","if","res",":","return","res","try",":","ttype","=","int","(","request",".","args","[","b\"type\"","]","[","0","]",")","except","ValueError",":","return","{","\"result\"",":","False",",","\"message\"",":","_","(","\"type %s is not a number\"",")","%","request",".","args","[","b\"type\"","]","[","0","]","}","timeout","=","-","1","if","b\"timeout\"","in","list","(","request",".","args",".","keys","(",")",")",":","try",":","timeout","=","int","(","request",".","args","[","b\"timeout\"","]","[","0","]",")","except","ValueError",":","pass","text","=","getUrlArg","(","request",",","\"text\"",")","return","sendMessage","(","self",".","session",",","text",",","ttype",",","timeout",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L693-L727"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_messageanswer","parameters":"(self, request)","argument_list":"","return_statement":"return getMessageAnswer()","docstring":"Request handler for the `messageanswer` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#messageanswer\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `messageanswer` endpoint.","docstring_tokens":["Request","handler","for","the","messageanswer","endpoint","."],"function":"def P_messageanswer(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `messageanswer` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#messageanswer\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getMessageAnswer()","function_tokens":["def","P_messageanswer","(","self",",","request",")",":","return","getMessageAnswer","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L729-L742"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_movielist","parameters":"(self, request)","argument_list":"","return_statement":"return getMovieList(request.args)","docstring":"Request handler for the `movielist` endpoint.\n\t\tRetrieve list of movie items. (alternative implementation)\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movielist\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `movielist` endpoint.\n\t\tRetrieve list of movie items. (alternative implementation)","docstring_tokens":["Request","handler","for","the","movielist","endpoint",".","Retrieve","list","of","movie","items",".","(","alternative","implementation",")"],"function":"def P_movielist(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `movielist` endpoint.\n\t\tRetrieve list of movie items. (alternative implementation)\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movielist\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getMovieList(request.args)","function_tokens":["def","P_movielist","(","self",",","request",")",":","return","getMovieList","(","request",".","args",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L744-L758"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_movielisthtml","parameters":"(self, request)","argument_list":"","return_statement":"return getMovieList(request.args)","docstring":"Request handler for the `movielisthtml` endpoint.\n\t\tRetrieve list of movie items in HTML format.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movielist.html\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `movielisthtml` endpoint.\n\t\tRetrieve list of movie items in HTML format.","docstring_tokens":["Request","handler","for","the","movielisthtml","endpoint",".","Retrieve","list","of","movie","items","in","HTML","format","."],"function":"def P_movielisthtml(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `movielisthtml` endpoint.\n\t\tRetrieve list of movie items in HTML format.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movielist.html\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\trequest.setHeader(\"content-type\", \"text\/html\")\n\t\treturn getMovieList(request.args)","function_tokens":["def","P_movielisthtml","(","self",",","request",")",":","request",".","setHeader","(","\"content-type\"",",","\"text\/html\"",")","return","getMovieList","(","request",".","args",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L763-L778"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_movielistm3u","parameters":"(self, request)","argument_list":"","return_statement":"return movielist","docstring":"Request handler for the `movielistm3u` endpoint.\n\t\tRetrieve list of movie items in M3U format.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movielist.m3u\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `movielistm3u` endpoint.\n\t\tRetrieve list of movie items in M3U format.","docstring_tokens":["Request","handler","for","the","movielistm3u","endpoint",".","Retrieve","list","of","movie","items","in","M3U","format","."],"function":"def P_movielistm3u(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `movielistm3u` endpoint.\n\t\tRetrieve list of movie items in M3U format.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movielist.m3u\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\trequest.setHeader('Content-Type', 'application\/x-mpegurl')\n\t\tmovielist = getMovieList(request.args)\n\t\tmovielist[\"host\"] = \"%s:\/\/%s:%s\" % (whoami(request)['proto'], request.getRequestHostname(), whoami(request)['port'])\n\t\treturn movielist","function_tokens":["def","P_movielistm3u","(","self",",","request",")",":","request",".","setHeader","(","'Content-Type'",",","'application\/x-mpegurl'",")","movielist","=","getMovieList","(","request",".","args",")","movielist","[","\"host\"","]","=","\"%s:\/\/%s:%s\"","%","(","whoami","(","request",")","[","'proto'","]",",","request",".","getRequestHostname","(",")",",","whoami","(","request",")","[","'port'","]",")","return","movielist"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L780-L797"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_movielistrss","parameters":"(self, request)","argument_list":"","return_statement":"return movielist","docstring":"Request handler for the `movielistrss` endpoint.\n\t\tRetrieve list of movie items in RSS format.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movielist.rss\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `movielistrss` endpoint.\n\t\tRetrieve list of movie items in RSS format.","docstring_tokens":["Request","handler","for","the","movielistrss","endpoint",".","Retrieve","list","of","movie","items","in","RSS","format","."],"function":"def P_movielistrss(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `movielistrss` endpoint.\n\t\tRetrieve list of movie items in RSS format.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movielist.rss\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tmovielist = getMovieList(request.args)\n\t\tmovielist[\"host\"] = \"%s:\/\/%s:%s\" % (whoami(request)['proto'], request.getRequestHostname(), whoami(request)['port'])\n\t\treturn movielist","function_tokens":["def","P_movielistrss","(","self",",","request",")",":","movielist","=","getMovieList","(","request",".","args",")","movielist","[","\"host\"","]","=","\"%s:\/\/%s:%s\"","%","(","whoami","(","request",")","[","'proto'","]",",","request",".","getRequestHostname","(",")",",","whoami","(","request",")","[","'port'","]",")","return","movielist"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L799-L814"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_moviedelete","parameters":"(self, request)","argument_list":"","return_statement":"return removeMovie(self.session, sRef, force)","docstring":"Request handler for the `moviedelete` endpoint.\n\t\tDelete movie file.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#moviedelete\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `moviedelete` endpoint.\n\t\tDelete movie file.","docstring_tokens":["Request","handler","for","the","moviedelete","endpoint",".","Delete","movie","file","."],"function":"def P_moviedelete(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `moviedelete` endpoint.\n\t\tDelete movie file.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#moviedelete\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"sRef\"])\n\t\tif res:\n\t\t\treturn res\n\t\tsRef = getUrlArg(request, \"sRef\")\n\t\tforce = getUrlArg(request, \"force\") != None\n\t\treturn removeMovie(self.session, sRef, force)","function_tokens":["def","P_moviedelete","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"sRef\"","]",")","if","res",":","return","res","sRef","=","getUrlArg","(","request",",","\"sRef\"",")","force","=","getUrlArg","(","request",",","\"force\"",")","!=","None","return","removeMovie","(","self",".","session",",","sRef",",","force",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L816-L834"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_moviemove","parameters":"(self, request)","argument_list":"","return_statement":"return moveMovie(self.session, sRef, dirname)","docstring":"Request handler for the `moviemove` endpoint.\n\t\tMove movie file.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#moviemove\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `moviemove` endpoint.\n\t\tMove movie file.","docstring_tokens":["Request","handler","for","the","moviemove","endpoint",".","Move","movie","file","."],"function":"def P_moviemove(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `moviemove` endpoint.\n\t\tMove movie file.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#moviemove\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"sRef\"])\n\t\tif res:\n\t\t\treturn res\n\t\tres = self.testMandatoryArguments(request, [\"dirname\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\tsRef = getUrlArg(request, \"sRef\")\n\t\tdirname = getUrlArg(request, \"dirname\")\n\t\treturn moveMovie(self.session, sRef, dirname)","function_tokens":["def","P_moviemove","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"sRef\"","]",")","if","res",":","return","res","res","=","self",".","testMandatoryArguments","(","request",",","[","\"dirname\"","]",")","if","res",":","return","res","sRef","=","getUrlArg","(","request",",","\"sRef\"",")","dirname","=","getUrlArg","(","request",",","\"dirname\"",")","return","moveMovie","(","self",".","session",",","sRef",",","dirname",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L836-L858"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_movierename","parameters":"(self, request)","argument_list":"","return_statement":"return renameMovie(self.session, sRef, newname)","docstring":"Request handler for the `movierename` endpoint.\n\t\tRename movie file.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movierename\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `movierename` endpoint.\n\t\tRename movie file.","docstring_tokens":["Request","handler","for","the","movierename","endpoint",".","Rename","movie","file","."],"function":"def P_movierename(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `movierename` endpoint.\n\t\tRename movie file.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movierename\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"sRef\"])\n\t\tif res:\n\t\t\treturn res\n\t\tres = self.testMandatoryArguments(request, [\"newname\"])\n\t\tif res:\n\t\t\treturn res\n\t\tsRef = getUrlArg(request, \"sRef\")\n\t\tnewname = getUrlArg(request, \"newname\")\n\t\treturn renameMovie(self.session, sRef, newname)","function_tokens":["def","P_movierename","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"sRef\"","]",")","if","res",":","return","res","res","=","self",".","testMandatoryArguments","(","request",",","[","\"newname\"","]",")","if","res",":","return","res","sRef","=","getUrlArg","(","request",",","\"sRef\"",")","newname","=","getUrlArg","(","request",",","\"newname\"",")","return","renameMovie","(","self",".","session",",","sRef",",","newname",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L860-L881"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_movietags","parameters":"(self, request)","argument_list":"","return_statement":"return getMovieInfo(_sRef, _add, _del)","docstring":"Request handler for the `movietags` endpoint.\n\t\tAdd\/Remove tags to movie file.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movietags\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `movietags` endpoint.\n\t\tAdd\/Remove tags to movie file.","docstring_tokens":["Request","handler","for","the","movietags","endpoint",".","Add","\/","Remove","tags","to","movie","file","."],"function":"def P_movietags(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `movietags` endpoint.\n\t\tAdd\/Remove tags to movie file.\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#movietags\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\t_add = getUrlArg(request, \"add\")\n\t\t_del = getUrlArg(request, \"del\")\n\t\t_sRef = getUrlArg(request, \"sRef\")\n\t\tif _sRef == None:\n\t\t\t_sRef = getUrlArg(request, \"sref\")\n\t\treturn getMovieInfo(_sRef, _add, _del)","function_tokens":["def","P_movietags","(","self",",","request",")",":","_add","=","getUrlArg","(","request",",","\"add\"",")","_del","=","getUrlArg","(","request",",","\"del\"",")","_sRef","=","getUrlArg","(","request",",","\"sRef\"",")","if","_sRef","==","None",":","_sRef","=","getUrlArg","(","request",",","\"sref\"",")","return","getMovieInfo","(","_sRef",",","_add",",","_del",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L884-L902"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_movieinfo","parameters":"(self, request)","argument_list":"","return_statement":"","docstring":"Request handler for the `movie` endpoint.\n\t\tAdd\/Remove tags to movie file. Multiple tags needs to separate by ,\n\t\tRemame title of movie.\n\t\tGet\/set movie cuts.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `movie` endpoint.\n\t\tAdd\/Remove tags to movie file. Multiple tags needs to separate by ,\n\t\tRemame title of movie.\n\t\tGet\/set movie cuts.","docstring_tokens":["Request","handler","for","the","movie","endpoint",".","Add","\/","Remove","tags","to","movie","file",".","Multiple","tags","needs","to","separate","by","Remame","title","of","movie",".","Get","\/","set","movie","cuts","."],"function":"def P_movieinfo(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `movie` endpoint.\n\t\tAdd\/Remove tags to movie file. Multiple tags needs to separate by ,\n\t\tRemame title of movie.\n\t\tGet\/set movie cuts.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\t_sRef = getUrlArg(request, \"sRef\")\n\t\tif _sRef == None:\n\t\t\t_sRef = getUrlArg(request, \"sref\")\n\t\tif _sRef != None:\n\t\t\t_addtag = getUrlArg(request, \"addtag\")\n\t\t\t_deltag = getUrlArg(request, \"deltag\")\n\t\t\t_title = getUrlArg(request, \"title\")\n\t\t\t_cuts = getUrlArg(request, \"cuts\")\n\t\t\t_desc = getUrlArg(request, \"desc\")\n\t\t\treturn getMovieInfo(_sRef, _addtag, _deltag, _title, _cuts, _desc ,True)\n\t\telse:\n\t\t\treturn getMovieInfo()","function_tokens":["def","P_movieinfo","(","self",",","request",")",":","_sRef","=","getUrlArg","(","request",",","\"sRef\"",")","if","_sRef","==","None",":","_sRef","=","getUrlArg","(","request",",","\"sref\"",")","if","_sRef","!=","None",":","_addtag","=","getUrlArg","(","request",",","\"addtag\"",")","_deltag","=","getUrlArg","(","request",",","\"deltag\"",")","_title","=","getUrlArg","(","request",",","\"title\"",")","_cuts","=","getUrlArg","(","request",",","\"cuts\"",")","_desc","=","getUrlArg","(","request",",","\"desc\"",")","return","getMovieInfo","(","_sRef",",","_addtag",",","_deltag",",","_title",",","_cuts",",","_desc",",","True",")","else",":","return","getMovieInfo","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L904-L927"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_moviedetails","parameters":"(self, request)","argument_list":"","return_statement":"","docstring":"Request handler for the `movie` endpoint.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `movie` endpoint.","docstring_tokens":["Request","handler","for","the","movie","endpoint","."],"function":"def P_moviedetails(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `movie` endpoint.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\t_sRef = getUrlArg(request, \"sRef\")\n\t\tif _sRef == None:\n\t\t\t_sRef = getUrlArg(request, \"sref\")\n\t\tif _sRef != None:\n\t\t\treturn getMovieDetails(_sRef)\n\t\telse:\n\t\t\treturn {\n\t\t\t\t\"result\": False\n\t\t\t}","function_tokens":["def","P_moviedetails","(","self",",","request",")",":","_sRef","=","getUrlArg","(","request",",","\"sRef\"",")","if","_sRef","==","None",":","_sRef","=","getUrlArg","(","request",",","\"sref\"",")","if","_sRef","!=","None",":","return","getMovieDetails","(","_sRef",")","else",":","return","{","\"result\"",":","False","}"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L929-L946"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_gettags","parameters":"(self, request)","argument_list":"","return_statement":"return getMovieInfo()","docstring":"Request handler for the `gettags` endpoint.\n\t\tGet tags of movie file (?).\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#gettags\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `gettags` endpoint.\n\t\tGet tags of movie file (?).","docstring_tokens":["Request","handler","for","the","gettags","endpoint",".","Get","tags","of","movie","file","(","?",")","."],"function":"def P_gettags(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `gettags` endpoint.\n\t\tGet tags of movie file (?).\n\n\t\t.. seealso::\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#gettags\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getMovieInfo()","function_tokens":["def","P_gettags","(","self",",","request",")",":","return","getMovieInfo","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L949-L962"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.vpsparams","parameters":"(self, request)","argument_list":"","return_statement":"return {\n\t\t\t\"vpsplugin_time\": vpsplugin_time,\n\t\t\t\"vpsplugin_overwrite\": vpsplugin_overwrite,\n\t\t\t\"vpsplugin_enabled\": vpsplugin_enabled\n\t\t}","docstring":"VPS related helper function(?)\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"VPS related helper function(?)","docstring_tokens":["VPS","related","helper","function","(","?",")"],"function":"def vpsparams(self, request):\n\t\t\"\"\"\n\t\tVPS related helper function(?)\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tvpsplugin_enabled = getUrlArg(request, \"vpsplugin_enabled\") == \"1\"\n\t\tvpsplugin_overwrite = getUrlArg(request, \"vpsplugin_overwrite\") == \"1\"\n\t\tvpsplugin_time = None\n\t\tif b\"vpsplugin_time\" in request.args:\n\t\t\tvpsplugin_time = int(float(request.args[b\"vpsplugin_time\"][0]))\n\t\t\tif vpsplugin_time == -1:\n\t\t\t\tvpsplugin_time = None\n\t\t# partnerbox:\n\t\tvps_pbox = getUrlArg(request, \"vps_pbox\")\n\t\tif vps_pbox != None:\n\t\t\tvpsplugin_enabled = None\n\t\t\tvpsplugin_overwrite = None\n\t\t\tif \"yes_safe\" in vps_pbox:\n\t\t\t\tvpsplugin_enabled = True\n\t\t\telif \"yes\" in vps_pbox:\n\t\t\t\tvpsplugin_enabled = True\n\t\t\t\tvpsplugin_overwrite = True\n\t\treturn {\n\t\t\t\"vpsplugin_time\": vpsplugin_time,\n\t\t\t\"vpsplugin_overwrite\": vpsplugin_overwrite,\n\t\t\t\"vpsplugin_enabled\": vpsplugin_enabled\n\t\t}","function_tokens":["def","vpsparams","(","self",",","request",")",":","vpsplugin_enabled","=","getUrlArg","(","request",",","\"vpsplugin_enabled\"",")","==","\"1\"","vpsplugin_overwrite","=","getUrlArg","(","request",",","\"vpsplugin_overwrite\"",")","==","\"1\"","vpsplugin_time","=","None","if","b\"vpsplugin_time\"","in","request",".","args",":","vpsplugin_time","=","int","(","float","(","request",".","args","[","b\"vpsplugin_time\"","]","[","0","]",")",")","if","vpsplugin_time","==","-","1",":","vpsplugin_time","=","None","# partnerbox:","vps_pbox","=","getUrlArg","(","request",",","\"vps_pbox\"",")","if","vps_pbox","!=","None",":","vpsplugin_enabled","=","None","vpsplugin_overwrite","=","None","if","\"yes_safe\"","in","vps_pbox",":","vpsplugin_enabled","=","True","elif","\"yes\"","in","vps_pbox",":","vpsplugin_enabled","=","True","vpsplugin_overwrite","=","True","return","{","\"vpsplugin_time\"",":","vpsplugin_time",",","\"vpsplugin_overwrite\"",":","vpsplugin_overwrite",",","\"vpsplugin_enabled\"",":","vpsplugin_enabled","}"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L965-L995"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_vpschannels","parameters":"(self, request)","argument_list":"","return_statement":"return getVPSChannels(self.session)","docstring":"Request handler for the `vpschannels` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `vpschannels` endpoint.","docstring_tokens":["Request","handler","for","the","vpschannels","endpoint","."],"function":"def P_vpschannels(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `vpschannels` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getVPSChannels(self.session)","function_tokens":["def","P_vpschannels","(","self",",","request",")",":","return","getVPSChannels","(","self",".","session",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L997-L1010"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_timerlist","parameters":"(self, request)","argument_list":"","return_statement":"return ret","docstring":"Request handler for the `timerlist` endpoint.\n\t\tRetrieve list of timers.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timerlist\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `timerlist` endpoint.\n\t\tRetrieve list of timers.","docstring_tokens":["Request","handler","for","the","timerlist","endpoint",".","Retrieve","list","of","timers","."],"function":"def P_timerlist(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `timerlist` endpoint.\n\t\tRetrieve list of timers.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timerlist\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tret = getTimers(self.session)\n\t\tret[\"locations\"] = comp_config.movielist.videodirs.value\n\t\treturn ret","function_tokens":["def","P_timerlist","(","self",",","request",")",":","ret","=","getTimers","(","self",".","session",")","ret","[","\"locations\"","]","=","comp_config",".","movielist",".","videodirs",".","value","return","ret"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1012-L1028"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_timeradd","parameters":"(self, request)","argument_list":"","return_statement":"return self._AddEditTimer(request, 0)","docstring":"Request handler for the `timeradd` endpoint.\n\t\tAdd timer\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timeradd\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `timeradd` endpoint.\n\t\tAdd timer","docstring_tokens":["Request","handler","for","the","timeradd","endpoint",".","Add","timer"],"function":"def P_timeradd(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `timeradd` endpoint.\n\t\tAdd timer\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timeradd\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"sRef\", \"begin\", \"end\", \"name\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\treturn self._AddEditTimer(request, 0)","function_tokens":["def","P_timeradd","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"sRef\"",",","\"begin\"",",","\"end\"",",","\"name\"","]",")","if","res",":","return","res","return","self",".","_AddEditTimer","(","request",",","0",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1168-L1186"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_timeraddbyeventid","parameters":"(self, request)","argument_list":"","return_statement":"return self._AddEditTimer(request, 1)","docstring":"Request handler for the `timeraddbyeventid` endpoint.\n\t\tAdd timer by event ID\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timeraddbyeventid\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/timeraddbyeventid\n\t\t\t:query string sRef: service reference\n\t\t\t:query int eventid: Event ID\n\t\t\t:query int justplay: *Just Play* indicator\n\t\t\t:query string dirname: target path(?)\n\t\t\t:query string tags: tags to add(?)\n\t\t\t:query int always_zap: always zap first(?)\n\t\t\t:query int afterevent: afterevent state","docstring_summary":"Request handler for the `timeraddbyeventid` endpoint.\n\t\tAdd timer by event ID","docstring_tokens":["Request","handler","for","the","timeraddbyeventid","endpoint",".","Add","timer","by","event","ID"],"function":"def P_timeraddbyeventid(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `timeraddbyeventid` endpoint.\n\t\tAdd timer by event ID\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timeraddbyeventid\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/timeraddbyeventid\n\t\t\t:query string sRef: service reference\n\t\t\t:query int eventid: Event ID\n\t\t\t:query int justplay: *Just Play* indicator\n\t\t\t:query string dirname: target path(?)\n\t\t\t:query string tags: tags to add(?)\n\t\t\t:query int always_zap: always zap first(?)\n\t\t\t:query int afterevent: afterevent state\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"sRef\", \"eventid\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\treturn self._AddEditTimer(request, 1)","function_tokens":["def","P_timeraddbyeventid","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"sRef\"",",","\"eventid\"","]",")","if","res",":","return","res","return","self",".","_AddEditTimer","(","request",",","1",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1188-L1215"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_timerchange","parameters":"(self, request)","argument_list":"","return_statement":"return self._AddEditTimer(request, 2)","docstring":"Request handler for the `timerchange` endpoint.\n\t\tChange timer\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timerchange\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/timerchange\n\n\t\t\t:query string sRef: service reference\n\t\t\t:query int begin: begin timestamp\n\t\t\t:query int end: end timestamp\n\t\t\t:query string name: name\n\t\t\t:query string description: description\n\t\t\t:query string channelOld: old channel(?)\n\t\t\t:query int beginOld: old begin timestamp(?)\n\t\t\t:query int endOld: old end timestamp(?)\n\t\t\t:query int justplay: *Just Play* indicator\n\t\t\t:query string dirname: target path(?)\n\t\t\t:query string tags: tags to add(?)\n\t\t\t:query int always_zap: always zap first(?)\n\t\t\t:query int disabled: disabled state\n\t\t\t:query int afterevent: afterevent state","docstring_summary":"Request handler for the `timerchange` endpoint.\n\t\tChange timer","docstring_tokens":["Request","handler","for","the","timerchange","endpoint",".","Change","timer"],"function":"def P_timerchange(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `timerchange` endpoint.\n\t\tChange timer\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timerchange\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/timerchange\n\n\t\t\t:query string sRef: service reference\n\t\t\t:query int begin: begin timestamp\n\t\t\t:query int end: end timestamp\n\t\t\t:query string name: name\n\t\t\t:query string description: description\n\t\t\t:query string channelOld: old channel(?)\n\t\t\t:query int beginOld: old begin timestamp(?)\n\t\t\t:query int endOld: old end timestamp(?)\n\t\t\t:query int justplay: *Just Play* indicator\n\t\t\t:query string dirname: target path(?)\n\t\t\t:query string tags: tags to add(?)\n\t\t\t:query int always_zap: always zap first(?)\n\t\t\t:query int disabled: disabled state\n\t\t\t:query int afterevent: afterevent state\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"sRef\", \"begin\", \"end\", \"name\", \"channelOld\", \"beginOld\", \"endOld\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\treturn self._AddEditTimer(request, 2)","function_tokens":["def","P_timerchange","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"sRef\"",",","\"begin\"",",","\"end\"",",","\"name\"",",","\"channelOld\"",",","\"beginOld\"",",","\"endOld\"","]",")","if","res",":","return","res","return","self",".","_AddEditTimer","(","request",",","2",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1217-L1252"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_timertogglestatus","parameters":"(self, request)","argument_list":"","return_statement":"return toggleTimerStatus(self.session, getUrlArg(request, \"sRef\"), begin, end)","docstring":"Request handler for the `timertogglestatus` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `timertogglestatus` endpoint.","docstring_tokens":["Request","handler","for","the","timertogglestatus","endpoint","."],"function":"def P_timertogglestatus(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `timertogglestatus` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"sRef\", \"begin\", \"end\"])\n\t\tif res:\n\t\t\treturn res\n\t\ttry:\n\t\t\tbegin = int(request.args[b\"begin\"][0])\n\t\texcept Exception: # nosec # noqa: E722\n\t\t\treturn {\n\t\t\t\t\"result\": False,\n\t\t\t\t\"message\": \"The parameter 'begin' must be a number\"\n\t\t\t}\n\n\t\ttry:\n\t\t\tend = int(request.args[b\"end\"][0])\n\t\texcept Exception: # nosec # noqa: E722\n\t\t\treturn {\n\t\t\t\t\"result\": False,\n\t\t\t\t\"message\": \"The parameter 'end' must be a number\"\n\t\t\t}\n\n\t\treturn toggleTimerStatus(self.session, getUrlArg(request, \"sRef\"), begin, end)","function_tokens":["def","P_timertogglestatus","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"sRef\"",",","\"begin\"",",","\"end\"","]",")","if","res",":","return","res","try",":","begin","=","int","(","request",".","args","[","b\"begin\"","]","[","0","]",")","except","Exception",":","# nosec # noqa: E722","return","{","\"result\"",":","False",",","\"message\"",":","\"The parameter 'begin' must be a number\"","}","try",":","end","=","int","(","request",".","args","[","b\"end\"","]","[","0","]",")","except","Exception",":","# nosec # noqa: E722","return","{","\"result\"",":","False",",","\"message\"",":","\"The parameter 'end' must be a number\"","}","return","toggleTimerStatus","(","self",".","session",",","getUrlArg","(","request",",","\"sRef\"",")",",","begin",",","end",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1254-L1286"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_timerdelete","parameters":"(self, request)","argument_list":"","return_statement":"return removeTimer(self.session, getUrlArg(request, \"sRef\"), begin, end, eit)","docstring":"Request handler for the `timerdelete` endpoint.\n\t\tDelete timer\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timerdelete\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `timerdelete` endpoint.\n\t\tDelete timer","docstring_tokens":["Request","handler","for","the","timerdelete","endpoint",".","Delete","timer"],"function":"def P_timerdelete(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `timerdelete` endpoint.\n\t\tDelete timer\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timerdelete\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"sRef\", \"begin\", \"end\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\ttry:\n\t\t\tbegin = int(request.args[b\"begin\"][0])\n\t\texcept Exception: # nosec # noqa: E722\n\t\t\treturn {\n\t\t\t\t\"result\": False,\n\t\t\t\t\"message\": \"The parameter 'begin' must be a number\"\n\t\t\t}\n\n\t\ttry:\n\t\t\tend = int(request.args[b\"end\"][0])\n\t\texcept Exception: # nosec # noqa: E722\n\t\t\treturn {\n\t\t\t\t\"result\": False,\n\t\t\t\t\"message\": \"The parameter 'end' must be a number\"\n\t\t\t}\n\n\t\ttry:\n\t\t\teit = int(request.args[b\"eit\"][0])\n\t\texcept Exception: # nosec # noqa: E722\n\t\t\teit = None\n\n\t\treturn removeTimer(self.session, getUrlArg(request, \"sRef\"), begin, end, eit)","function_tokens":["def","P_timerdelete","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"sRef\"",",","\"begin\"",",","\"end\"","]",")","if","res",":","return","res","try",":","begin","=","int","(","request",".","args","[","b\"begin\"","]","[","0","]",")","except","Exception",":","# nosec # noqa: E722","return","{","\"result\"",":","False",",","\"message\"",":","\"The parameter 'begin' must be a number\"","}","try",":","end","=","int","(","request",".","args","[","b\"end\"","]","[","0","]",")","except","Exception",":","# nosec # noqa: E722","return","{","\"result\"",":","False",",","\"message\"",":","\"The parameter 'end' must be a number\"","}","try",":","eit","=","int","(","request",".","args","[","b\"eit\"","]","[","0","]",")","except","Exception",":","# nosec # noqa: E722","eit","=","None","return","removeTimer","(","self",".","session",",","getUrlArg","(","request",",","\"sRef\"",")",",","begin",",","end",",","eit",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1288-L1327"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_timercleanup","parameters":"(self, request)","argument_list":"","return_statement":"return cleanupTimer(self.session)","docstring":"Request handler for the `timercleanup` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timercleanup\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `timercleanup` endpoint.","docstring_tokens":["Request","handler","for","the","timercleanup","endpoint","."],"function":"def P_timercleanup(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `timercleanup` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timercleanup\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn cleanupTimer(self.session)","function_tokens":["def","P_timercleanup","(","self",",","request",")",":","return","cleanupTimer","(","self",".","session",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1329-L1342"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_timerlistwrite","parameters":"(self, request)","argument_list":"","return_statement":"return writeTimerList(self.session)","docstring":"Request handler for the `timerlistwrite` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timerlistwrite\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `timerlistwrite` endpoint.","docstring_tokens":["Request","handler","for","the","timerlistwrite","endpoint","."],"function":"def P_timerlistwrite(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `timerlistwrite` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#timerlistwrite\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn writeTimerList(self.session)","function_tokens":["def","P_timerlistwrite","(","self",",","request",")",":","return","writeTimerList","(","self",".","session",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1344-L1357"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_recordnow","parameters":"(self, request)","argument_list":"","return_statement":"return recordNow(self.session, infinite)","docstring":"Request handler for the `recordnow` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#recordnow\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `recordnow` endpoint.","docstring_tokens":["Request","handler","for","the","recordnow","endpoint","."],"function":"def P_recordnow(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `recordnow` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#recordnow\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tinfinite = False\n\t\tif b\"undefinitely\" in list(request.args.keys()) or b\"infinite\" in list(request.args.keys()):\n\t\t\tinfinite = True\n\t\treturn recordNow(self.session, infinite)","function_tokens":["def","P_recordnow","(","self",",","request",")",":","infinite","=","False","if","b\"undefinitely\"","in","list","(","request",".","args",".","keys","(",")",")","or","b\"infinite\"","in","list","(","request",".","args",".","keys","(",")",")",":","infinite","=","True","return","recordNow","(","self",".","session",",","infinite",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1359-L1375"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_currenttime","parameters":"(self, request)","argument_list":"","return_statement":"return getCurrentTime()","docstring":"Request handler for the `currenttime` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#currenttime\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `currenttime` endpoint.","docstring_tokens":["Request","handler","for","the","currenttime","endpoint","."],"function":"def P_currenttime(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `currenttime` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#currenttime\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getCurrentTime()","function_tokens":["def","P_currenttime","(","self",",","request",")",":","return","getCurrentTime","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1377-L1390"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_deviceinfo","parameters":"(self, request)","argument_list":"","return_statement":"return getInfo(session=self.session, need_fullinfo=True)","docstring":"Request handler for the `deviceinfo` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#deviceinfo\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `deviceinfo` endpoint.","docstring_tokens":["Request","handler","for","the","deviceinfo","endpoint","."],"function":"def P_deviceinfo(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `deviceinfo` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#deviceinfo\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getInfo(session=self.session, need_fullinfo=True)","function_tokens":["def","P_deviceinfo","(","self",",","request",")",":","return","getInfo","(","session","=","self",".","session",",","need_fullinfo","=","True",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1392-L1405"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_epgmulti","parameters":"(self, request)","argument_list":"","return_statement":"return getBouquetEpg(getUrlArg(request, \"bRef\"), begintime, endtime, self.isJson)","docstring":"Request handler for the `epgmulti` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `epgmulti` endpoint.","docstring_tokens":["Request","handler","for","the","epgmulti","endpoint","."],"function":"def P_epgmulti(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `epgmulti` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"bRef\"])\n\t\tif res:\n\t\t\treturn res\n\n\t\tbegintime = -1\n\t\tif b\"time\" in list(request.args.keys()):\n\t\t\ttry:\n\t\t\t\tbegintime = int(request.args[b\"time\"][0])\n\t\t\texcept ValueError:\n\t\t\t\tpass\n\n\t\tendtime = None\n\t\tif b\"endTime\" in list(request.args.keys()):\n\t\t\ttry:\n\t\t\t\tendtime = int(request.args[b\"endTime\"][0])\n\t\t\texcept ValueError:\n\t\t\t\tpass\n\t\treturn getBouquetEpg(getUrlArg(request, \"bRef\"), begintime, endtime, self.isJson)","function_tokens":["def","P_epgmulti","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"bRef\"","]",")","if","res",":","return","res","begintime","=","-","1","if","b\"time\"","in","list","(","request",".","args",".","keys","(",")",")",":","try",":","begintime","=","int","(","request",".","args","[","b\"time\"","]","[","0","]",")","except","ValueError",":","pass","endtime","=","None","if","b\"endTime\"","in","list","(","request",".","args",".","keys","(",")",")",":","try",":","endtime","=","int","(","request",".","args","[","b\"endTime\"","]","[","0","]",")","except","ValueError",":","pass","return","getBouquetEpg","(","getUrlArg","(","request",",","\"bRef\"",")",",","begintime",",","endtime",",","self",".","isJson",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1442-L1472"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_epgxmltv","parameters":"(self, request)","argument_list":"","return_statement":"return ret","docstring":"Request handler for the `epgxmltv` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\t\tbRef: mandatory, method uses epgmulti\n\t\t\tlang: mandatory, needed for xmltv and Enigma2 has no parameter for epg language\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `epgxmltv` endpoint.","docstring_tokens":["Request","handler","for","the","epgxmltv","endpoint","."],"function":"def P_epgxmltv(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `epgxmltv` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\t\tbRef: mandatory, method uses epgmulti\n\t\t\tlang: mandatory, needed for xmltv and Enigma2 has no parameter for epg language\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"bRef\", \"lang\"])\n\t\tif res:\n\t\t\treturn res\n\t\tret = self.P_epgmulti(request)\n\t\tbRef = getUrlArg(request, \"bRef\")\n\t\tret[\"services\"] = getServices(bRef, True, False)[\"services\"]\n\t\tret[\"lang\"] = getUrlArg(request, \"lang\")\n\t\tret[\"offset\"] = getUtcOffset()\n\t\treturn ret","function_tokens":["def","P_epgxmltv","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"bRef\"",",","\"lang\"","]",")","if","res",":","return","res","ret","=","self",".","P_epgmulti","(","request",")","bRef","=","getUrlArg","(","request",",","\"bRef\"",")","ret","[","\"services\"","]","=","getServices","(","bRef",",","True",",","False",")","[","\"services\"","]","ret","[","\"lang\"","]","=","getUrlArg","(","request",",","\"lang\"",")","ret","[","\"offset\"","]","=","getUtcOffset","(",")","return","ret"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1474-L1497"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_epgsearch","parameters":"(self, request)","argument_list":"","return_statement":"","docstring":"EPG event search and lookup handler.\n\n\t\t.. note::\n\n\t\t\tOne may use\n\t\t\t:py:func:`controllers.events.EventsController.search` for\n\t\t\tsearching events.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#epgsearch\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"EPG event search and lookup handler.","docstring_tokens":["EPG","event","search","and","lookup","handler","."],"function":"def P_epgsearch(self, request):\n\t\t\"\"\"\n\t\tEPG event search and lookup handler.\n\n\t\t.. note::\n\n\t\t\tOne may use\n\t\t\t:py:func:`controllers.events.EventsController.search` for\n\t\t\tsearching events.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#epgsearch\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tsearch = getUrlArg(request, \"search\")\n\t\tif search != None:\n\t\t\tendtime = None\n\t\t\tif b\"endtime\" in list(request.args.keys()):\n\t\t\t\ttry:\n\t\t\t\t\tendtime = int(request.args[b\"endtime\"][0])\n\t\t\t\texcept ValueError:\n\t\t\t\t\tpass\n\t\t\tfulldesc = False\n\t\t\tif b\"full\" in list(request.args.keys()):\n\t\t\t\tfulldesc = True\n\t\t\treturn getSearchEpg(search, endtime, fulldesc, False, self.isJson)\n\t\telse:\n\t\t\tres = self.testMandatoryArguments(request, [\"eventid\"])\n\t\t\tif res:\n\t\t\t\treturn res\n\t\t\tsRef = getUrlArg(request, \"sRef\")\n\t\t\tif sRef == None:\n\t\t\t\tsRef = getUrlArg(request, \"sref\")\n\t\t\tif sRef == None:\n\t\t\t\treturn {\n\t\t\t\t\t\"result\": False,\n\t\t\t\t\t\"message\": _(\"The parameter '%s' can't be empty\") % \"sRef,sref\"\n\t\t\t\t}\n\t\t\titem_id = 0\n\t\t\ttry:\n\t\t\t\titem_id = int(request.args[b\"eventid\"][0])\n\t\t\texcept ValueError:\n\t\t\t\tpass\n\t\t\treturn getEvent(sRef, item_id, self.isJson)","function_tokens":["def","P_epgsearch","(","self",",","request",")",":","search","=","getUrlArg","(","request",",","\"search\"",")","if","search","!=","None",":","endtime","=","None","if","b\"endtime\"","in","list","(","request",".","args",".","keys","(",")",")",":","try",":","endtime","=","int","(","request",".","args","[","b\"endtime\"","]","[","0","]",")","except","ValueError",":","pass","fulldesc","=","False","if","b\"full\"","in","list","(","request",".","args",".","keys","(",")",")",":","fulldesc","=","True","return","getSearchEpg","(","search",",","endtime",",","fulldesc",",","False",",","self",".","isJson",")","else",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"eventid\"","]",")","if","res",":","return","res","sRef","=","getUrlArg","(","request",",","\"sRef\"",")","if","sRef","==","None",":","sRef","=","getUrlArg","(","request",",","\"sref\"",")","if","sRef","==","None",":","return","{","\"result\"",":","False",",","\"message\"",":","_","(","\"The parameter '%s' can't be empty\"",")","%","\"sRef,sref\"","}","item_id","=","0","try",":","item_id","=","int","(","request",".","args","[","b\"eventid\"","]","[","0","]",")","except","ValueError",":","pass","return","getEvent","(","sRef",",","item_id",",","self",".","isJson",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1527-L1575"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_getcurrent","parameters":"(self, request)","argument_list":"","return_statement":"return {\n\t\t\t\"info\": info,\n\t\t\t\"now\": mnow,\n\t\t\t\"next\": next\n\t\t}","docstring":"Request handler for the `getcurrent` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getcurrent\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\n\t\t.. http:get:: \/web\/getcurrent","docstring_summary":"Request handler for the `getcurrent` endpoint.","docstring_tokens":["Request","handler","for","the","getcurrent","endpoint","."],"function":"def P_getcurrent(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `getcurrent` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getcurrent\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\n\t\t.. http:get:: \/web\/getcurrent\n\n\t\t\"\"\"\n\t\tinfo = getCurrentService(self.session)\n\t\tnow = getNowNextEpg(info[\"ref\"], 0, self.isJson)\n\t\tif len(now[\"events\"]) > 0:\n\t\t\tnow = now[\"events\"][0]\n\t\t\tnow[\"provider\"] = info[\"provider\"]\n\t\telse:\n\t\t\tnow = {\n\t\t\t\t\"id\": 0,\n\t\t\t\t\"begin_timestamp\": 0,\n\t\t\t\t\"duration_sec\": 0,\n\t\t\t\t\"title\": \"\",\n\t\t\t\t\"shortdesc\": \"\",\n\t\t\t\t\"longdesc\": \"\",\n\t\t\t\t\"sref\": \"\",\n\t\t\t\t\"sname\": \"\",\n\t\t\t\t\"now_timestamp\": 0,\n\t\t\t\t\"remaining\": 0,\n\t\t\t\t\"provider\": \"\",\n\t\t\t\t\"genre\": \"\",\n\t\t\t\t\"genreid\": 0\n\t\t\t}\n\t\tnext = getNowNextEpg(info[\"ref\"], 1, self.isJson)\n\t\tif len(next[\"events\"]) > 0:\n\t\t\tnext = next[\"events\"][0]\n\t\t\tnext[\"provider\"] = info[\"provider\"]\n\t\telse:\n\t\t\tnext = {\n\t\t\t\t\"id\": 0,\n\t\t\t\t\"begin_timestamp\": 0,\n\t\t\t\t\"duration_sec\": 0,\n\t\t\t\t\"title\": \"\",\n\t\t\t\t\"shortdesc\": \"\",\n\t\t\t\t\"longdesc\": \"\",\n\t\t\t\t\"sref\": \"\",\n\t\t\t\t\"sname\": \"\",\n\t\t\t\t\"now_timestamp\": 0,\n\t\t\t\t\"remaining\": 0,\n\t\t\t\t\"provider\": \"\",\n\t\t\t\t\"genre\": \"\",\n\t\t\t\t\"genreid\": 0\n\t\t\t}\n\t\t# replace EPG NOW with Movie info\n\t\tmnow = now\n\t\tif mnow[\"sref\"].startswith('1:0:0:0:0:0:0:0:0:0:\/') or mnow[\"sref\"].startswith('4097:0:0:0:0:0:0:0:0:0:\/'):\n\t\t\ttry:\n\t\t\t\tservice = self.session.nav.getCurrentService()\n\t\t\t\tminfo = service and service.info()\n\t\t\t\tmovie = minfo and minfo.getEvent(0)\n\t\t\t\tif movie and minfo:\n\t\t\t\t\tmnow[\"title\"] = movie.getEventName()\n\t\t\t\t\tmnow[\"shortdesc\"] = movie.getShortDescription()\n\t\t\t\t\tmnow[\"longdesc\"] = movie.getExtendedDescription()\n\t\t\t\t\tmnow[\"begin_timestamp\"] = movie.getBeginTime()\n\t\t\t\t\tmnow[\"duration_sec\"] = movie.getDuration()\n\t\t\t\t\tmnow[\"remaining\"] = movie.getDuration()\n\t\t\t\t\tmnow[\"id\"] = movie.getEventId()\n\t\t\texcept Exception: # nosec # noqa: E722\n\t\t\t\tmnow = now\n\t\telif mnow[\"sref\"] == '':\n\t\t\tserviceref = self.session.nav.getCurrentlyPlayingServiceReference()\n\t\t\tif serviceref is not None:\n\t\t\t\ttry:\n\t\t\t\t\tif serviceref.toString().startswith('4097:0:0:0:0:0:0:0:0:0:\/'):\n\t\t\t\t\t\tfrom enigma import eServiceCenter\n\t\t\t\t\t\tserviceHandler = eServiceCenter.getInstance()\n\t\t\t\t\t\tsinfo = serviceHandler.info(serviceref)\n\t\t\t\t\t\tif sinfo:\n\t\t\t\t\t\t\tmnow[\"title\"] = sinfo.getName(serviceref)\n\t\t\t\t\t\tservicepath = serviceref and serviceref.getPath()\n\t\t\t\t\t\tif servicepath and servicepath.startswith(\"\/\"):\n\t\t\t\t\t\t\tmnow[\"filename\"] = servicepath\n\t\t\t\t\t\t\tmnow[\"sref\"] = serviceref.toString()\n\t\t\t\texcept Exception: # nosec\n\t\t\t\t\tpass\n\t\treturn {\n\t\t\t\"info\": info,\n\t\t\t\"now\": mnow,\n\t\t\t\"next\": next\n\t\t}","function_tokens":["def","P_getcurrent","(","self",",","request",")",":","info","=","getCurrentService","(","self",".","session",")","now","=","getNowNextEpg","(","info","[","\"ref\"","]",",","0",",","self",".","isJson",")","if","len","(","now","[","\"events\"","]",")",">","0",":","now","=","now","[","\"events\"","]","[","0","]","now","[","\"provider\"","]","=","info","[","\"provider\"","]","else",":","now","=","{","\"id\"",":","0",",","\"begin_timestamp\"",":","0",",","\"duration_sec\"",":","0",",","\"title\"",":","\"\"",",","\"shortdesc\"",":","\"\"",",","\"longdesc\"",":","\"\"",",","\"sref\"",":","\"\"",",","\"sname\"",":","\"\"",",","\"now_timestamp\"",":","0",",","\"remaining\"",":","0",",","\"provider\"",":","\"\"",",","\"genre\"",":","\"\"",",","\"genreid\"",":","0","}","next","=","getNowNextEpg","(","info","[","\"ref\"","]",",","1",",","self",".","isJson",")","if","len","(","next","[","\"events\"","]",")",">","0",":","next","=","next","[","\"events\"","]","[","0","]","next","[","\"provider\"","]","=","info","[","\"provider\"","]","else",":","next","=","{","\"id\"",":","0",",","\"begin_timestamp\"",":","0",",","\"duration_sec\"",":","0",",","\"title\"",":","\"\"",",","\"shortdesc\"",":","\"\"",",","\"longdesc\"",":","\"\"",",","\"sref\"",":","\"\"",",","\"sname\"",":","\"\"",",","\"now_timestamp\"",":","0",",","\"remaining\"",":","0",",","\"provider\"",":","\"\"",",","\"genre\"",":","\"\"",",","\"genreid\"",":","0","}","# replace EPG NOW with Movie info","mnow","=","now","if","mnow","[","\"sref\"","]",".","startswith","(","'1:0:0:0:0:0:0:0:0:0:\/'",")","or","mnow","[","\"sref\"","]",".","startswith","(","'4097:0:0:0:0:0:0:0:0:0:\/'",")",":","try",":","service","=","self",".","session",".","nav",".","getCurrentService","(",")","minfo","=","service","and","service",".","info","(",")","movie","=","minfo","and","minfo",".","getEvent","(","0",")","if","movie","and","minfo",":","mnow","[","\"title\"","]","=","movie",".","getEventName","(",")","mnow","[","\"shortdesc\"","]","=","movie",".","getShortDescription","(",")","mnow","[","\"longdesc\"","]","=","movie",".","getExtendedDescription","(",")","mnow","[","\"begin_timestamp\"","]","=","movie",".","getBeginTime","(",")","mnow","[","\"duration_sec\"","]","=","movie",".","getDuration","(",")","mnow","[","\"remaining\"","]","=","movie",".","getDuration","(",")","mnow","[","\"id\"","]","=","movie",".","getEventId","(",")","except","Exception",":","# nosec # noqa: E722","mnow","=","now","elif","mnow","[","\"sref\"","]","==","''",":","serviceref","=","self",".","session",".","nav",".","getCurrentlyPlayingServiceReference","(",")","if","serviceref","is","not","None",":","try",":","if","serviceref",".","toString","(",")",".","startswith","(","'4097:0:0:0:0:0:0:0:0:0:\/'",")",":","from","enigma","import","eServiceCenter","serviceHandler","=","eServiceCenter",".","getInstance","(",")","sinfo","=","serviceHandler",".","info","(","serviceref",")","if","sinfo",":","mnow","[","\"title\"","]","=","sinfo",".","getName","(","serviceref",")","servicepath","=","serviceref","and","serviceref",".","getPath","(",")","if","servicepath","and","servicepath",".","startswith","(","\"\/\"",")",":","mnow","[","\"filename\"","]","=","servicepath","mnow","[","\"sref\"","]","=","serviceref",".","toString","(",")","except","Exception",":","# nosec","pass","return","{","\"info\"",":","info",",","\"now\"",":","mnow",",","\"next\"",":","next","}"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1645-L1740"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_getpid","parameters":"(self, request)","argument_list":"","return_statement":"return {\n\t\t\t\"ppid\": \"%x\" % info[\"pmtpid\"],\n\t\t\t\"vpid\": \"%x\" % info[\"vpid\"],\n\t\t\t\"apid\": \"%x\" % info[\"apid\"],\n\t\t\t\"host\": request.getRequestHostname()\n\t\t}","docstring":"Request handler for the `getpid` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getpid\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `getpid` endpoint.","docstring_tokens":["Request","handler","for","the","getpid","endpoint","."],"function":"def P_getpid(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `getpid` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#getpid\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\trequest.setHeader(\"content-type\", \"text\/html\")\n\t\tinfo = getCurrentService(self.session)\n\t\treturn {\n\t\t\t\"ppid\": \"%x\" % info[\"pmtpid\"],\n\t\t\t\"vpid\": \"%x\" % info[\"vpid\"],\n\t\t\t\"apid\": \"%x\" % info[\"apid\"],\n\t\t\t\"host\": request.getRequestHostname()\n\t\t}","function_tokens":["def","P_getpid","(","self",",","request",")",":","request",".","setHeader","(","\"content-type\"",",","\"text\/html\"",")","info","=","getCurrentService","(","self",".","session",")","return","{","\"ppid\"",":","\"%x\"","%","info","[","\"pmtpid\"","]",",","\"vpid\"",":","\"%x\"","%","info","[","\"vpid\"","]",",","\"apid\"",":","\"%x\"","%","info","[","\"apid\"","]",",","\"host\"",":","request",".","getRequestHostname","(",")","}"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1742-L1762"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_streamm3u","parameters":"(self, request)","argument_list":"","return_statement":"return getStream(self.session, request, \"stream.m3u\")","docstring":"Request handler for the `streamm3u` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#stream.m3u\n\n\t\t.. note::\n\n\t\t\tParameters Not available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/stream.m3u\n\n\t\t\t:query string ref: service reference\n\t\t\t:query string name: service name","docstring_summary":"Request handler for the `streamm3u` endpoint.","docstring_tokens":["Request","handler","for","the","streamm3u","endpoint","."],"function":"def P_streamm3u(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `streamm3u` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#stream.m3u\n\n\t\t.. note::\n\n\t\t\tParameters Not available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/stream.m3u\n\n\t\t\t:query string ref: service reference\n\t\t\t:query string name: service name\n\t\t\"\"\"\n\t\tself.isCustom = True\n\t\tif comp_config.OpenWebif.webcache.zapstream.value:\n\t\t\tref = getUrlArg(request, \"ref\")\n\t\t\tif ref != None:\n\t\t\t\tname = getUrlArg(request, \"name\", \"\")\n\t\t\t\tzapService(self.session, ref, name, stream=True)\n\t\treturn getStream(self.session, request, \"stream.m3u\")","function_tokens":["def","P_streamm3u","(","self",",","request",")",":","self",".","isCustom","=","True","if","comp_config",".","OpenWebif",".","webcache",".","zapstream",".","value",":","ref","=","getUrlArg","(","request",",","\"ref\"",")","if","ref","!=","None",":","name","=","getUrlArg","(","request",",","\"name\"",",","\"\"",")","zapService","(","self",".","session",",","ref",",","name",",","stream","=","True",")","return","getStream","(","self",".","session",",","request",",","\"stream.m3u\"",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1776-L1804"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_tsm3u","parameters":"(self, request)","argument_list":"","return_statement":"return getTS(self.session, request)","docstring":"Request handler for the `tsm3u` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#ts.m3u\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/ts.m3u","docstring_summary":"Request handler for the `tsm3u` endpoint.","docstring_tokens":["Request","handler","for","the","tsm3u","endpoint","."],"function":"def P_tsm3u(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `tsm3u` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#ts.m3u\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/ts.m3u\n\n\t\t\"\"\"\n\t\tself.isCustom = True\n\t\treturn getTS(self.session, request)","function_tokens":["def","P_tsm3u","(","self",",","request",")",":","self",".","isCustom","=","True","return","getTS","(","self",".","session",",","request",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1806-L1823"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_streamcurrentm3u","parameters":"(self, request)","argument_list":"","return_statement":"return getStream(self.session, request, \"streamcurrent.m3u\")","docstring":"Request handler for the `streamcurrentm3u` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#streamcurrent.m3u\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/streamcurrent.m3u","docstring_summary":"Request handler for the `streamcurrentm3u` endpoint.","docstring_tokens":["Request","handler","for","the","streamcurrentm3u","endpoint","."],"function":"def P_streamcurrentm3u(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `streamcurrentm3u` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#streamcurrent.m3u\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/streamcurrent.m3u\n\n\t\t\"\"\"\n\t\tself.isCustom = True\n\t\treturn getStream(self.session, request, \"streamcurrent.m3u\")","function_tokens":["def","P_streamcurrentm3u","(","self",",","request",")",":","self",".","isCustom","=","True","return","getStream","(","self",".","session",",","request",",","\"streamcurrent.m3u\"",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1829-L1846"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_streamsubservices","parameters":"(self, request)","argument_list":"","return_statement":"return getStreamSubservices(self.session, request)","docstring":"Request handler for the `streamsubservices` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#streamsubservices\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/streamsubservices\n\n\t\t\t:query string sRef: service reference","docstring_summary":"Request handler for the `streamsubservices` endpoint.","docstring_tokens":["Request","handler","for","the","streamsubservices","endpoint","."],"function":"def P_streamsubservices(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `streamsubservices` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#streamsubservices\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/streamsubservices\n\n\t\t\t:query string sRef: service reference\n\t\t\"\"\"\n\t\treturn getStreamSubservices(self.session, request)","function_tokens":["def","P_streamsubservices","(","self",",","request",")",":","return","getStreamSubservices","(","self",".","session",",","request",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1848-L1865"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_servicelistreload","parameters":"(self, request)","argument_list":"","return_statement":"return reloadServicesLists(self.session, mode)","docstring":"Reload service lists, transponders, parental control black-\/white lists\n\t\tor\/and lamedb.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#servicelistreload\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Reload service lists, transponders, parental control black-\/white lists\n\t\tor\/and lamedb.","docstring_tokens":["Reload","service","lists","transponders","parental","control","black","-","\/","white","lists","or","\/","and","lamedb","."],"function":"def P_servicelistreload(self, request):\n\t\t\"\"\"\n\t\tReload service lists, transponders, parental control black-\/white lists\n\t\tor\/and lamedb.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#servicelistreload\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tmode = getUrlArg(request, \"mode\")\n\t\treturn reloadServicesLists(self.session, mode)","function_tokens":["def","P_servicelistreload","(","self",",","request",")",":","mode","=","getUrlArg","(","request",",","\"mode\"",")","return","reloadServicesLists","(","self",".","session",",","mode",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1867-L1882"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_tvbrowser","parameters":"(self, request)","argument_list":"","return_statement":"return tvbrowser(self.session, request)","docstring":"Request handler for the `tvbrowser` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#tvbrowser\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `tvbrowser` endpoint.","docstring_tokens":["Request","handler","for","the","tvbrowser","endpoint","."],"function":"def P_tvbrowser(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `tvbrowser` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#tvbrowser\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn tvbrowser(self.session, request)","function_tokens":["def","P_tvbrowser","(","self",",","request",")",":","return","tvbrowser","(","self",".","session",",","request",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1884-L1897"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_saveconfig","parameters":"(self, request)","argument_list":"","return_statement":"return {\"result\": False}","docstring":"Request handler for the `saveconfig` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:post:: \/web\/saveconfig\n\n\t\t\t:query string key: configuration key\n\t\t\t:query string value: configuration value","docstring_summary":"Request handler for the `saveconfig` endpoint.","docstring_tokens":["Request","handler","for","the","saveconfig","endpoint","."],"function":"def P_saveconfig(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `saveconfig` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:post:: \/web\/saveconfig\n\n\t\t\t:query string key: configuration key\n\t\t\t:query string value: configuration value\n\t\t\"\"\"\n\t\tif request.method == b'POST':\n\t\t\tres = self.testMandatoryArguments(request, [\"key\"])\n\t\t\tif res:\n\t\t\t\treturn res\n\t\t\tvalue = getUrlArg(request, \"value\")\n\t\t\tif value != None:\n\t\t\t\tkey = getUrlArg(request, \"key\")\n\t\t\t\treturn saveConfig(key, value)\n\t\treturn {\"result\": False}","function_tokens":["def","P_saveconfig","(","self",",","request",")",":","if","request",".","method","==","b'POST'",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"key\"","]",")","if","res",":","return","res","value","=","getUrlArg","(","request",",","\"value\"",")","if","value","!=","None",":","key","=","getUrlArg","(","request",",","\"key\"",")","return","saveConfig","(","key",",","value",")","return","{","\"result\"",":","False","}"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1899-L1925"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_pluginlistread","parameters":"(self, request)","argument_list":"","return_statement":"return reloadPlugins()","docstring":"Request handler for the `pluginlistread` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#pluginlistread\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `pluginlistread` endpoint.","docstring_tokens":["Request","handler","for","the","pluginlistread","endpoint","."],"function":"def P_pluginlistread(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `pluginlistread` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#pluginlistread\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn reloadPlugins()","function_tokens":["def","P_pluginlistread","(","self",",","request",")",":","return","reloadPlugins","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1978-L1991"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_restarttwisted","parameters":"(self, request)","argument_list":"","return_statement":"return \"\"","docstring":"Request handler for the `restarttwisted` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#restarttwisted\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `restarttwisted` endpoint.","docstring_tokens":["Request","handler","for","the","restarttwisted","endpoint","."],"function":"def P_restarttwisted(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `restarttwisted` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#restarttwisted\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tfrom Plugins.Extensions.OpenWebif.httpserver import HttpdRestart\n\t\tHttpdRestart(self.session)\n\t\treturn \"\"","function_tokens":["def","P_restarttwisted","(","self",",","request",")",":","from","Plugins",".","Extensions",".","OpenWebif",".","httpserver","import","HttpdRestart","HttpdRestart","(","self",".","session",")","return","\"\""],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L1993-L2008"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_sleeptimer","parameters":"(self, request)","argument_list":"","return_statement":"return setSleepTimer(self.session, time, action, enabled)","docstring":"Request handler for the `sleeptimer` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#sleeptimer\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/sleeptimer\n\n\t\t\t:query string cmd: command (*get* or *set*)\n\t\t\t:query int time: time in minutes (*0* -- *999*)\n\t\t\t:query string action: action (*standby* or *shutdown*)\n\t\t\t:query string enabled: enabled (*True* or *False*)\n\t\t\t:query string confirmed: confirmed (supported?)","docstring_summary":"Request handler for the `sleeptimer` endpoint.","docstring_tokens":["Request","handler","for","the","sleeptimer","endpoint","."],"function":"def P_sleeptimer(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `sleeptimer` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#sleeptimer\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\n\t\t.. http:get:: \/web\/sleeptimer\n\n\t\t\t:query string cmd: command (*get* or *set*)\n\t\t\t:query int time: time in minutes (*0* -- *999*)\n\t\t\t:query string action: action (*standby* or *shutdown*)\n\t\t\t:query string enabled: enabled (*True* or *False*)\n\t\t\t:query string confirmed: confirmed (supported?)\n\t\t\"\"\"\n\t\tcmd = getUrlArg(request, \"cmd\", \"get\")\n\t\tif cmd == \"get\":\n\t\t\treturn getSleepTimer(self.session)\n\n\t\ttime = getUrlArg(request, \"time\")\n\t\tif time != None:\n\t\t\ttry:\n\t\t\t\ttime = int(time)\n\t\t\t\tif time > 999:\n\t\t\t\t\ttime = 999\n\t\t\t\telif time < 0:\n\t\t\t\t\ttime = 0\n\t\t\texcept ValueError:\n\t\t\t\tpass\n\n\t\taction = getUrlArg(request, \"action\", \"standby\")\n\t\tenabled = getUrlArg(request, \"enabled\")\n\t\tif enabled != None:\n\t\t\tif enabled == \"True\" or enabled == \"true\":\n\t\t\t\tenabled = True\n\t\t\telif enabled == \"False\" or enabled == \"false\":\n\t\t\t\tenabled = False\n\n\t\tret = getSleepTimer(self.session)\n\n\t\tif cmd != \"set\":\n\t\t\tret[\"message\"] = \"ERROR: Obligatory parameter 'cmd' [get,set] has unspecified value '%s'\" % cmd\n\t\t\treturn ret\n\n\t\tif time is None and enabled is True: # it's used only if the timer is enabled\n\t\t\tret[\"message\"] = \"ERROR: Obligatory parameter 'time' [0-999] is missing\"\n\t\t\treturn ret\n\n\t\tif enabled is None:\n\t\t\tret[\"message\"] = \"Obligatory parameter 'enabled' [True,False] is missing\"\n\t\t\treturn ret\n\n\t\treturn setSleepTimer(self.session, time, action, enabled)","function_tokens":["def","P_sleeptimer","(","self",",","request",")",":","cmd","=","getUrlArg","(","request",",","\"cmd\"",",","\"get\"",")","if","cmd","==","\"get\"",":","return","getSleepTimer","(","self",".","session",")","time","=","getUrlArg","(","request",",","\"time\"",")","if","time","!=","None",":","try",":","time","=","int","(","time",")","if","time",">","999",":","time","=","999","elif","time","<","0",":","time","=","0","except","ValueError",":","pass","action","=","getUrlArg","(","request",",","\"action\"",",","\"standby\"",")","enabled","=","getUrlArg","(","request",",","\"enabled\"",")","if","enabled","!=","None",":","if","enabled","==","\"True\"","or","enabled","==","\"true\"",":","enabled","=","True","elif","enabled","==","\"False\"","or","enabled","==","\"false\"",":","enabled","=","False","ret","=","getSleepTimer","(","self",".","session",")","if","cmd","!=","\"set\"",":","ret","[","\"message\"","]","=","\"ERROR: Obligatory parameter 'cmd' [get,set] has unspecified value '%s'\"","%","cmd","return","ret","if","time","is","None","and","enabled","is","True",":","# it's used only if the timer is enabled","ret","[","\"message\"","]","=","\"ERROR: Obligatory parameter 'time' [0-999] is missing\"","return","ret","if","enabled","is","None",":","ret","[","\"message\"","]","=","\"Obligatory parameter 'enabled' [True,False] is missing\"","return","ret","return","setSleepTimer","(","self",".","session",",","time",",","action",",","enabled",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L2019-L2077"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_external","parameters":"(self, request)","argument_list":"","return_statement":"","docstring":"Request handler for the `external` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#external\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `external` endpoint.","docstring_tokens":["Request","handler","for","the","external","endpoint","."],"function":"def P_external(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `external` endpoint.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#external\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\ttry:\n\t\t\tfrom Plugins.Extensions.WebInterface.WebChilds.Toplevel import loaded_plugins\n\t\t\tresult = []\n\t\t\tfor p in loaded_plugins:\n\t\t\t\tresult.append((p[0], '', p[2], p[3]))\n\t\t\treturn {\n\t\t\t\t\"plugins\": result\n\t\t\t}\n\t\texcept Exception:\n\t\t\treturn {\n\t\t\t\t\"plugins\": []\n\t\t\t}","function_tokens":["def","P_external","(","self",",","request",")",":","try",":","from","Plugins",".","Extensions",".","WebInterface",".","WebChilds",".","Toplevel","import","loaded_plugins","result","=","[","]","for","p","in","loaded_plugins",":","result",".","append","(","(","p","[","0","]",",","''",",","p","[","2","]",",","p","[","3","]",")",")","return","{","\"plugins\"",":","result","}","except","Exception",":","return","{","\"plugins\"",":","[","]","}"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L2079-L2103"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_settings","parameters":"(self, request)","argument_list":"","return_statement":"return getSettings()","docstring":"Request handler for the `settings` endpoint.\n\t\tRetrieve list of key\/kalue pairs of device configuration.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#settings\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `settings` endpoint.\n\t\tRetrieve list of key\/kalue pairs of device configuration.","docstring_tokens":["Request","handler","for","the","settings","endpoint",".","Retrieve","list","of","key","\/","kalue","pairs","of","device","configuration","."],"function":"def P_settings(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `settings` endpoint.\n\t\tRetrieve list of key\/kalue pairs of device configuration.\n\n\t\t.. seealso::\n\n\t\t\thttps:\/\/dream.reichholf.net\/e2web\/#settings\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn getSettings()","function_tokens":["def","P_settings","(","self",",","request",")",":","return","getSettings","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L2105-L2119"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_bouquets","parameters":"(self, request)","argument_list":"","return_statement":"return getBouquets(stype)","docstring":"Request handler for the `boquets` endpoint.\n\t\tGet list of tuples (bouquet reference, bouquet name) for available\n\t\tbouquets.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `boquets` endpoint.\n\t\tGet list of tuples (bouquet reference, bouquet name) for available\n\t\tbouquets.","docstring_tokens":["Request","handler","for","the","boquets","endpoint",".","Get","list","of","tuples","(","bouquet","reference","bouquet","name",")","for","available","bouquets","."],"function":"def P_bouquets(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `boquets` endpoint.\n\t\tGet list of tuples (bouquet reference, bouquet name) for available\n\t\tbouquets.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tstype = getUrlArg(request, \"stype\", \"tv\")\n\t\treturn getBouquets(stype)","function_tokens":["def","P_bouquets","(","self",",","request",")",":","stype","=","getUrlArg","(","request",",","\"stype\"",",","\"tv\"",")","return","getBouquets","(","stype",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L2121-L2137"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_saveepg","parameters":"(self, request)","argument_list":"","return_statement":"return saveEpg()","docstring":"Request handler for the `saveepg` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `saveepg` endpoint.","docstring_tokens":["Request","handler","for","the","saveepg","endpoint","."],"function":"def P_saveepg(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `saveepg` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn saveEpg()","function_tokens":["def","P_saveepg","(","self",",","request",")",":","return","saveEpg","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L2146-L2159"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_loadepg","parameters":"(self, request)","argument_list":"","return_statement":"return loadEpg()","docstring":"Request handler for the `loadepg` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `loadepg` endpoint.","docstring_tokens":["Request","handler","for","the","loadepg","endpoint","."],"function":"def P_loadepg(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `loadepg` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\treturn loadEpg()","function_tokens":["def","P_loadepg","(","self",",","request",")",":","return","loadEpg","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L2161-L2174"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_getsubtitles","parameters":"(self, request)","argument_list":"","return_statement":"return ret","docstring":"Request handler for the `getsubtitles` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Request handler for the `getsubtitles` endpoint.","docstring_tokens":["Request","handler","for","the","getsubtitles","endpoint","."],"function":"def P_getsubtitles(self, request):\n\t\t\"\"\"\n\t\tRequest handler for the `getsubtitles` endpoint.\n\n\t\t.. note::\n\n\t\t\tNot available in *Enigma2 WebInterface API*.\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tservice = self.session.nav.getCurrentService()\n\t\tret = {\"subtitlelist\": [], \"result\": False}\n\t\tsubtitle = service and service.subtitle()\n\t\tsubtitlelist = subtitle and subtitle.getSubtitleList()\n\t\tif subtitlelist:\n\t\t\tfor i in list(range(0, len(subtitlelist))):\n\t\t\t\tret[\"result\"] = True\n\t\t\t\tsubt = subtitlelist[i]\n\t\t\t\tret[\"subtitlelist\"].append({\n\t\t\t\t\t\"type\": subt[0],\n\t\t\t\t\t\"pid\": subt[1],\n\t\t\t\t\t\"page_nr\": subt[2],\n\t\t\t\t\t\"mag_nr\": subt[3],\n\t\t\t\t\t\"lang\": subt[4]\n\t\t\t\t})\n\t\treturn ret","function_tokens":["def","P_getsubtitles","(","self",",","request",")",":","service","=","self",".","session",".","nav",".","getCurrentService","(",")","ret","=","{","\"subtitlelist\"",":","[","]",",","\"result\"",":","False","}","subtitle","=","service","and","service",".","subtitle","(",")","subtitlelist","=","subtitle","and","subtitle",".","getSubtitleList","(",")","if","subtitlelist",":","for","i","in","list","(","range","(","0",",","len","(","subtitlelist",")",")",")",":","ret","[","\"result\"","]","=","True","subt","=","subtitlelist","[","i","]","ret","[","\"subtitlelist\"","]",".","append","(","{","\"type\"",":","subt","[","0","]",",","\"pid\"",":","subt","[","1","]",",","\"page_nr\"",":","subt","[","2","]",",","\"mag_nr\"",":","subt","[","3","]",",","\"lang\"",":","subt","[","4","]","}",")","return","ret"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L2176-L2204"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/web.py","language":"python","identifier":"WebController.P_getserviceref","parameters":"(self, request)","argument_list":"","return_statement":"return getServiceRef(name, searchinBouquetsOnly, bRef)","docstring":"Get the serviceref from name.\n\n\n\t\t.. http:get:: \/api\/getserviceref\n\n\t\t\t:query string name: service name to find\n\t\t\t:query string searchinBouquetsOnly: must be 'true'\n\t\t\t:query string bRef: define only one single bouquet where to find\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers","docstring_summary":"Get the serviceref from name.","docstring_tokens":["Get","the","serviceref","from","name","."],"function":"def P_getserviceref(self, request):\n\t\t\"\"\"\n\t\tGet the serviceref from name.\n\n\n\t\t.. http:get:: \/api\/getserviceref\n\n\t\t\t:query string name: service name to find\n\t\t\t:query string searchinBouquetsOnly: must be 'true'\n\t\t\t:query string bRef: define only one single bouquet where to find\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\t\tReturns:\n\t\t\tHTTP response with headers\n\t\t\"\"\"\n\t\tres = self.testMandatoryArguments(request, [\"name\"])\n\t\tif res:\n\t\t\treturn res\n\t\tname = getUrlArg(request, \"name\")\n\t\tbRef = getUrlArg(request, \"bRef\")\n\t\tsearchinBouquetsOnly = (getUrlArg(request, \"searchinBouquetsOnly\") == 'true')\n\t\treturn getServiceRef(name, searchinBouquetsOnly, bRef)","function_tokens":["def","P_getserviceref","(","self",",","request",")",":","res","=","self",".","testMandatoryArguments","(","request",",","[","\"name\"","]",")","if","res",":","return","res","name","=","getUrlArg","(","request",",","\"name\"",")","bRef","=","getUrlArg","(","request",",","\"bRef\"",")","searchinBouquetsOnly","=","(","getUrlArg","(","request",",","\"searchinBouquetsOnly\"",")","==","'true'",")","return","getServiceRef","(","name",",","searchinBouquetsOnly",",","bRef",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/web.py#L2338-L2360"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/mobile.py","language":"python","identifier":"MobileController.NoDataRender","parameters":"(self)","argument_list":"","return_statement":"return ['index', 'control', 'screenshot', 'satfinder', 'about']","docstring":"mobile requests with no extra data","docstring_summary":"mobile requests with no extra data","docstring_tokens":["mobile","requests","with","no","extra","data"],"function":"def NoDataRender(self):\n\t\t\"\"\"\n\t\tmobile requests with no extra data\n\t\t\"\"\"\n\t\treturn ['index', 'control', 'screenshot', 'satfinder', 'about']","function_tokens":["def","NoDataRender","(","self",")",":","return","[","'index'",",","'control'",",","'screenshot'",",","'satfinder'",",","'about'","]"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/mobile.py#L42-L46"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/base.py","language":"python","identifier":"BaseController.__init__","parameters":"(self, path=\"\", **kwargs)","argument_list":"","return_statement":"","docstring":"Args:\n\t\t\t* path: Base path\n\t\t\t* session: (?) Session instance\n\t\t\t* withMainTemplate: (?)\n\t\t\t* isJson: responses shall be JSON encoded\n\t\t\t* isCustom: (?)\n\t\t\t* isGZ: responses shall be GZIP compressed\n\t\t\t* isMobile: (?) responses shall be optimised for mobile devices\n\t\t\t* isImage: (?) responses shall image","docstring_summary":"","docstring_tokens":[],"function":"def __init__(self, path=\"\", **kwargs):\n\t\t\"\"\"\n\n\t\tArgs:\n\t\t\t* path: Base path\n\t\t\t* session: (?) Session instance\n\t\t\t* withMainTemplate: (?)\n\t\t\t* isJson: responses shall be JSON encoded\n\t\t\t* isCustom: (?)\n\t\t\t* isGZ: responses shall be GZIP compressed\n\t\t\t* isMobile: (?) responses shall be optimised for mobile devices\n\t\t\t* isImage: (?) responses shall image\n\t\t\"\"\"\n\t\tresource.Resource.__init__(self)\n\n\t\tself.path = six.ensure_str(path)\n\t\tself.session = kwargs.get(\"session\")\n\t\tself.withMainTemplate = kwargs.get(\"withMainTemplate\", False)\n\t\tself.isJson = kwargs.get(\"isJson\", False)\n\t\tself.isCustom = kwargs.get(\"isCustom\", False)\n\t\tself.isGZ = kwargs.get(\"isGZ\", False)\n\t\tself.isMobile = kwargs.get(\"isMobile\", False)\n\t\tself.isImage = kwargs.get(\"isImage\", False)","function_tokens":["def","__init__","(","self",",","path","=","\"\"",",","*","*","kwargs",")",":","resource",".","Resource",".","__init__","(","self",")","self",".","path","=","six",".","ensure_str","(","path",")","self",".","session","=","kwargs",".","get","(","\"session\"",")","self",".","withMainTemplate","=","kwargs",".","get","(","\"withMainTemplate\"",",","False",")","self",".","isJson","=","kwargs",".","get","(","\"isJson\"",",","False",")","self",".","isCustom","=","kwargs",".","get","(","\"isCustom\"",",","False",")","self",".","isGZ","=","kwargs",".","get","(","\"isGZ\"",",","False",")","self",".","isMobile","=","kwargs",".","get","(","\"isMobile\"",",","False",")","self",".","isImage","=","kwargs",".","get","(","\"isImage\"",",","False",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/base.py#L82-L104"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/base.py","language":"python","identifier":"BaseController.error404","parameters":"(self, request)","argument_list":"","return_statement":"","docstring":"Perform HTTP Error 404\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object","docstring_summary":"Perform HTTP Error 404","docstring_tokens":["Perform","HTTP","Error","404"],"function":"def error404(self, request):\n\t\t\"\"\"\n\t\tPerform HTTP Error 404\n\n\t\tArgs:\n\t\t\trequest (twisted.web.server.Request): HTTP request object\n\n\t\t\"\"\"\n\t\trequest.setHeader(\"content-type\", \"text\/html\")\n\t\trequest.setResponseCode(http.NOT_FOUND)\n\t\trequest.write(b\"Open Webif<\/title><\/head><body><h1>Error 404: Page not found<\/h1><br \/>The requested URL was not found on this server.<\/body><\/html>\")\n\t\trequest.finish()","function_tokens":["def","error404","(","self",",","request",")",":","request",".","setHeader","(","\"content-type\"",",","\"text\/html\"",")","request",".","setResponseCode","(","http",".","NOT_FOUND",")","request",".","write","(","b\"<html><head><title>Open Webif<\/title><\/head><body><h1>Error 404: Page not found<\/h1><br \/>The requested URL was not found on this server.<\/body><\/html>\"",")","request",".","finish","(",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/base.py#L106-L117"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/utilities.py","language":"python","identifier":"lenient_decode","parameters":"(value, encoding=None)","argument_list":"","return_statement":"return value.decode(encoding, 'ignore')","docstring":"Decode an encoded string and convert it to an unicode string.\n\n\tArgs:\n\t\tvalue: input value\n\t\tencoding: string encoding, defaults to utf-8\n\tReturns:\n\t\t(unicode) decoded value\n\n\t>>> lenient_decode(\"Hallo\")\n\tu'Hallo'\n\t>>> lenient_decode(u\"Hallo\")\n\tu'Hallo'\n\t>>> lenient_decode(\"H\u00e4ll\u00f6\u00dc\")\n\tu'H\\\\xe4ll\\\\xf6\\\\xdc'","docstring_summary":"Decode an encoded string and convert it to an unicode string.","docstring_tokens":["Decode","an","encoded","string","and","convert","it","to","an","unicode","string","."],"function":"def lenient_decode(value, encoding=None):\n\t\"\"\"\n\tDecode an encoded string and convert it to an unicode string.\n\n\tArgs:\n\t\tvalue: input value\n\t\tencoding: string encoding, defaults to utf-8\n\tReturns:\n\t\t(unicode) decoded value\n\n\t>>> lenient_decode(\"Hallo\")\n\tu'Hallo'\n\t>>> lenient_decode(u\"Hallo\")\n\tu'Hallo'\n\t>>> lenient_decode(\"H\u00e4ll\u00f6\u00dc\")\n\tu'H\\\\xe4ll\\\\xf6\\\\xdc'\n\t\"\"\"\n\tif isinstance(value, six.text_type):\n\t\treturn value\n\n\tif encoding is None:\n\t\tencoding = 'utf_8'\n\n\treturn value.decode(encoding, 'ignore')","function_tokens":["def","lenient_decode","(","value",",","encoding","=","None",")",":","if","isinstance","(","value",",","six",".","text_type",")",":","return","value","if","encoding","is","None",":","encoding","=","'utf_8'","return","value",".","decode","(","encoding",",","'ignore'",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/utilities.py#L73-L96"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/utilities.py","language":"python","identifier":"lenient_force_utf_8","parameters":"(value)","argument_list":"","return_statement":"return lenient_decode(value).encode('utf_8')","docstring":"Args:\n\t\tvalue: input value\n\tReturns:\n\t\t(basestring) utf-8 encoded value\n\n\t>>> isinstance(lenient_force_utf_8(''), basestring)\n\tTrue\n\t>>> lenient_force_utf_8(u\"Hallo\")\n\t'Hallo'\n\t>>> lenient_force_utf_8(\"H\u00e4ll\u00f6\u00dc\")\n\t'H\\\\xc3\\\\xa4ll\\\\xc3\\\\xb6\\\\xc3\\\\x9c'","docstring_summary":"","docstring_tokens":[],"function":"def lenient_force_utf_8(value):\n\t\"\"\"\n\n\tArgs:\n\t\tvalue: input value\n\tReturns:\n\t\t(basestring) utf-8 encoded value\n\n\t>>> isinstance(lenient_force_utf_8(''), basestring)\n\tTrue\n\t>>> lenient_force_utf_8(u\"Hallo\")\n\t'Hallo'\n\t>>> lenient_force_utf_8(\"H\u00e4ll\u00f6\u00dc\")\n\t'H\\\\xc3\\\\xa4ll\\\\xc3\\\\xb6\\\\xc3\\\\x9c'\n\t\"\"\"\n\tif isinstance(value, six.text_type):\n\t\treturn value\n\treturn lenient_decode(value).encode('utf_8')","function_tokens":["def","lenient_force_utf_8","(","value",")",":","if","isinstance","(","value",",","six",".","text_type",")",":","return","value","return","lenient_decode","(","value",")",".","encode","(","'utf_8'",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/utilities.py#L99-L116"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/utilities.py","language":"python","identifier":"sanitise_filename_slashes","parameters":"(value)","argument_list":"","return_statement":"return re.sub(MANY_SLASHES_REGEX, '\/', value)","docstring":"Args:\n\t\tvalue: input value\n\tReturns:\n\t\tvalue w\/o multiple slashes\n\n\t>>> in_value = \"\/\/\/tmp\/x\/y\/z\"\n\t>>> expected = re.sub(\"^\/+\", \"\/\", \"\/\/\/tmp\/x\/y\/z\")\n\t>>> sanitise_filename_slashes(in_value) == expected\n\tTrue","docstring_summary":"","docstring_tokens":[],"function":"def sanitise_filename_slashes(value):\n\t\"\"\"\n\n\tArgs:\n\t\tvalue: input value\n\tReturns:\n\t\tvalue w\/o multiple slashes\n\n\t>>> in_value = \"\/\/\/tmp\/x\/y\/z\"\n\t>>> expected = re.sub(\"^\/+\", \"\/\", \"\/\/\/tmp\/x\/y\/z\")\n\t>>> sanitise_filename_slashes(in_value) == expected\n\tTrue\n\t\"\"\"\n\treturn re.sub(MANY_SLASHES_REGEX, '\/', value)","function_tokens":["def","sanitise_filename_slashes","(","value",")",":","return","re",".","sub","(","MANY_SLASHES_REGEX",",","'\/'",",","value",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/utilities.py#L119-L132"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/utilities.py","language":"python","identifier":"get_config_attribute","parameters":"(path, root_obj, head=None)","argument_list":"","return_statement":"return current_obj","docstring":"Determine attribute of *root_obj* to be accessed by *path* in a\n\t(somewhat) safe manner.\n\tThis implementation will allow key and index based accessing too\n\t(e.g. ``config.some_list[0]`` or ``config.some_dict['some_key']``)\n\tThe *path* value needs to start with *head* (default='config').\n\n\tArgs:\n\t\tpath: character string specifying which attribute is to be accessed\n\t\troot_obj: An object whose attributes are to be accessed.\n\t\thead: Value of the first portion of *path*\n\n\tReturns:\n\t\tAttribute of *root_obj*\n\n\tRaises:\n\t\tValueError: If *path* is invalid.\n\t\tAttributeError: If attribute cannot be accessed","docstring_summary":"Determine attribute of *root_obj* to be accessed by *path* in a\n\t(somewhat) safe manner.\n\tThis implementation will allow key and index based accessing too\n\t(e.g. ``config.some_list[0]`` or ``config.some_dict['some_key']``)\n\tThe *path* value needs to start with *head* (default='config').","docstring_tokens":["Determine","attribute","of","*","root_obj","*","to","be","accessed","by","*","path","*","in","a","(","somewhat",")","safe","manner",".","This","implementation","will","allow","key","and","index","based","accessing","too","(","e",".","g",".","config",".","some_list","[","0","]","or","config",".","some_dict","[","some_key","]",")","The","*","path","*","value","needs","to","start","with","*","head","*","(","default","=","config",")","."],"function":"def get_config_attribute(path, root_obj, head=None):\n\t\"\"\"\n\tDetermine attribute of *root_obj* to be accessed by *path* in a\n\t(somewhat) safe manner.\n\tThis implementation will allow key and index based accessing too\n\t(e.g. ``config.some_list[0]`` or ``config.some_dict['some_key']``)\n\tThe *path* value needs to start with *head* (default='config').\n\n\tArgs:\n\t\tpath: character string specifying which attribute is to be accessed\n\t\troot_obj: An object whose attributes are to be accessed.\n\t\thead: Value of the first portion of *path*\n\n\tReturns:\n\t\tAttribute of *root_obj*\n\n\tRaises:\n\t\tValueError: If *path* is invalid.\n\t\tAttributeError: If attribute cannot be accessed\n\t\"\"\"\n\tif head is None:\n\t\thead = 'config'\n\tportions = path.split('.')\n\n\tif len(portions) < 2:\n\t\traise ValueError('Invalid path length')\n\n\tif portions[0] != head:\n\t\traise ValueError(\n\t\t\t'Head is {!r}, expected {!r}'.format(portions[0], head))\n\n\tcurrent_obj = root_obj\n\n\tfor attr_name in portions[1:]:\n\t\tif not attr_name:\n\t\t\traise ValueError(\"empty attr_name\")\n\n\t\tif attr_name.startswith('_'):\n\t\t\traise ValueError('private member')\n\n\t\tmatcher = REGEX_ITEM_OR_KEY_ACCESS.match(attr_name)\n\n\t\tif matcher:\n\t\t\tgdict = matcher.groupdict()\n\t\t\tattr_name = gdict.get('attr_name')\n\t\t\tnext_obj = getattr(current_obj, attr_name)\n\n\t\t\tif gdict.get(\"index\"):\n\t\t\t\tindex = int(gdict.get(\"index\"))\n\t\t\t\tcurrent_obj = next_obj[index]\n\t\t\telse:\n\t\t\t\tkey = gdict[\"key\"]\n\t\t\t\tcurrent_obj = next_obj[key]\n\t\telse:\n\t\t\tcurrent_obj = getattr(current_obj, attr_name)\n\n\treturn current_obj","function_tokens":["def","get_config_attribute","(","path",",","root_obj",",","head","=","None",")",":","if","head","is","None",":","head","=","'config'","portions","=","path",".","split","(","'.'",")","if","len","(","portions",")","<","2",":","raise","ValueError","(","'Invalid path length'",")","if","portions","[","0","]","!=","head",":","raise","ValueError","(","'Head is {!r}, expected {!r}'",".","format","(","portions","[","0","]",",","head",")",")","current_obj","=","root_obj","for","attr_name","in","portions","[","1",":","]",":","if","not","attr_name",":","raise","ValueError","(","\"empty attr_name\"",")","if","attr_name",".","startswith","(","'_'",")",":","raise","ValueError","(","'private member'",")","matcher","=","REGEX_ITEM_OR_KEY_ACCESS",".","match","(","attr_name",")","if","matcher",":","gdict","=","matcher",".","groupdict","(",")","attr_name","=","gdict",".","get","(","'attr_name'",")","next_obj","=","getattr","(","current_obj",",","attr_name",")","if","gdict",".","get","(","\"index\"",")",":","index","=","int","(","gdict",".","get","(","\"index\"",")",")","current_obj","=","next_obj","[","index","]","else",":","key","=","gdict","[","\"key\"","]","current_obj","=","next_obj","[","key","]","else",":","current_obj","=","getattr","(","current_obj",",","attr_name",")","return","current_obj"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/utilities.py#L135-L191"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/utilities.py","language":"python","identifier":"parse_servicereference","parameters":"(serviceref)","argument_list":"","return_statement":"return sref_data","docstring":"Parse a Enigma2 style service reference string representation.\n\n\t:param serviceref: Enigma2 style service reference\n\t:type serviceref: string\n\n\t>>> sref = '1:0:1:300:7:85:00c00000:0:0:0:'\n\t>>> result = parse_servicereference(sref)\n\t>>> result\n\t{'service_type': 1, 'oid': 133, 'tsid': 7, 'ns': 12582912, 'sid': 768}\n\t>>> sref_g = create_servicereference(**result)\n\t>>> sref_g\n\t'1:0:1:300:7:85:00c00000:0:0:0:'\n\t>>> sref_g2 = create_servicereference(result)\n\t>>> sref_g2\n\t'1:0:1:300:7:85:00c00000:0:0:0:'\n\t>>> sref == sref_g\n\tTrue\n\t>>> sref2 = '1:64:A:0:0:0:0:0:0:0::SKY Sport'\n\t>>> result2 = parse_servicereference(sref2)\n\t>>> result2\n\t{'service_type': 10, 'oid': 0, 'tsid': 0, 'ns': 0, 'sid': 0}\n\t>>> sref3 = '1:0:0:0:0:0:0:0:0:0:\/media\/hdd\/movie\/20170921 2055 - DASDING - DASDING Sprechstunde - .ts'\n\t>>> result3 = parse_servicereference(sref3)\n\t>>> result3\n\t{'service_type': 0, 'oid': 0, 'tsid': 0, 'ns': 0, 'sid': 0}","docstring_summary":"Parse a Enigma2 style service reference string representation.","docstring_tokens":["Parse","a","Enigma2","style","service","reference","string","representation","."],"function":"def parse_servicereference(serviceref):\n\t\"\"\"\n\tParse a Enigma2 style service reference string representation.\n\n\t:param serviceref: Enigma2 style service reference\n\t:type serviceref: string\n\n\t>>> sref = '1:0:1:300:7:85:00c00000:0:0:0:'\n\t>>> result = parse_servicereference(sref)\n\t>>> result\n\t{'service_type': 1, 'oid': 133, 'tsid': 7, 'ns': 12582912, 'sid': 768}\n\t>>> sref_g = create_servicereference(**result)\n\t>>> sref_g\n\t'1:0:1:300:7:85:00c00000:0:0:0:'\n\t>>> sref_g2 = create_servicereference(result)\n\t>>> sref_g2\n\t'1:0:1:300:7:85:00c00000:0:0:0:'\n\t>>> sref == sref_g\n\tTrue\n\t>>> sref2 = '1:64:A:0:0:0:0:0:0:0::SKY Sport'\n\t>>> result2 = parse_servicereference(sref2)\n\t>>> result2\n\t{'service_type': 10, 'oid': 0, 'tsid': 0, 'ns': 0, 'sid': 0}\n\t>>> sref3 = '1:0:0:0:0:0:0:0:0:0:\/media\/hdd\/movie\/20170921 2055 - DASDING - DASDING Sprechstunde - .ts'\n\t>>> result3 = parse_servicereference(sref3)\n\t>>> result3\n\t{'service_type': 0, 'oid': 0, 'tsid': 0, 'ns': 0, 'sid': 0}\n\t\"\"\"\n\tparts = serviceref.split(\":\")\n\tsref_data = {\n\t\t'service_type': int(parts[2], 16),\n\t\t'sid': int(parts[3], 16),\n\t\t'tsid': int(parts[4], 16),\n\t\t'oid': int(parts[5], 16),\n\t\t'ns': int(parts[6], 16)\n\t}\n\treturn sref_data","function_tokens":["def","parse_servicereference","(","serviceref",")",":","parts","=","serviceref",".","split","(","\":\"",")","sref_data","=","{","'service_type'",":","int","(","parts","[","2","]",",","16",")",",","'sid'",":","int","(","parts","[","3","]",",","16",")",",","'tsid'",":","int","(","parts","[","4","]",",","16",")",",","'oid'",":","int","(","parts","[","5","]",",","16",")",",","'ns'",":","int","(","parts","[","6","]",",","16",")","}","return","sref_data"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/utilities.py#L194-L230"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/utilities.py","language":"python","identifier":"create_servicereference","parameters":"(*args, **kwargs)","argument_list":"","return_statement":"return '{:x}:0:{:x}:{:x}:{:x}:{:x}:{:08x}:0:0:0:'.format(\n\t\t1,\n\t\tservice_type,\n\t\tsid,\n\t\ttsid,\n\t\toid,\n\t\tns)","docstring":"Generate a (Enigma2 style) service reference string representation.\n\n\t:param args[0]: Service Reference Parameter as dict\n\t:type args[0]: :class:`dict`\n\n\t:param service_type: Service Type\n\t:type service_type: int\n\n\t:param sid: SID\n\t:type sid: int\n\n\t:param tsid: TSID\n\t:type tsid: int\n\n\t:param oid: OID\n\t:type oid: int\n\n\t:param ns: Enigma2 Namespace\n\t:type ns: int","docstring_summary":"Generate a (Enigma2 style) service reference string representation.","docstring_tokens":["Generate","a","(","Enigma2","style",")","service","reference","string","representation","."],"function":"def create_servicereference(*args, **kwargs):\n\t\"\"\"\n\tGenerate a (Enigma2 style) service reference string representation.\n\n\t:param args[0]: Service Reference Parameter as dict\n\t:type args[0]: :class:`dict`\n\n\t:param service_type: Service Type\n\t:type service_type: int\n\n\t:param sid: SID\n\t:type sid: int\n\n\t:param tsid: TSID\n\t:type tsid: int\n\n\t:param oid: OID\n\t:type oid: int\n\n\t:param ns: Enigma2 Namespace\n\t:type ns: int\n\t\"\"\"\n\tif len(args) == 1 and isinstance(args[0], dict):\n\t\tkwargs = args[0]\n\tservice_type = kwargs.get('service_type', 0)\n\tsid = kwargs.get('sid', 0)\n\ttsid = kwargs.get('tsid', 0)\n\toid = kwargs.get('oid', 0)\n\tns = kwargs.get('ns', 0)\n\n\treturn '{:x}:0:{:x}:{:x}:{:x}:{:x}:{:08x}:0:0:0:'.format(\n\t\t1,\n\t\tservice_type,\n\t\tsid,\n\t\ttsid,\n\t\toid,\n\t\tns)","function_tokens":["def","create_servicereference","(","*","args",",","*","*","kwargs",")",":","if","len","(","args",")","==","1","and","isinstance","(","args","[","0","]",",","dict",")",":","kwargs","=","args","[","0","]","service_type","=","kwargs",".","get","(","'service_type'",",","0",")","sid","=","kwargs",".","get","(","'sid'",",","0",")","tsid","=","kwargs",".","get","(","'tsid'",",","0",")","oid","=","kwargs",".","get","(","'oid'",",","0",")","ns","=","kwargs",".","get","(","'ns'",",","0",")","return","'{:x}:0:{:x}:{:x}:{:x}:{:x}:{:08x}:0:0:0:'",".","format","(","1",",","service_type",",","sid",",","tsid",",","oid",",","ns",")"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/utilities.py#L233-L269"} {"nwo":"E2OpenPlugins\/e2openplugin-OpenWebif","sha":"b238b3770b90f49ba076987f66a4f042eb4b318e","path":"plugin\/controllers\/ajax.py","language":"python","identifier":"AjaxController.NoDataRender","parameters":"(self)","argument_list":"","return_statement":"return ['powerstate', 'message', 'myepg', 'radio', 'terminal', 'bqe', 'tv', 'satfinder']","docstring":"ajax requests with no extra data","docstring_summary":"ajax requests with no extra data","docstring_tokens":["ajax","requests","with","no","extra","data"],"function":"def NoDataRender(self):\n\t\t\"\"\"\n\t\tajax requests with no extra data\n\t\t\"\"\"\n\t\treturn ['powerstate', 'message', 'myepg', 'radio', 'terminal', 'bqe', 'tv', 'satfinder']","function_tokens":["def","NoDataRender","(","self",")",":","return","[","'powerstate'",",","'message'",",","'myepg'",",","'radio'",",","'terminal'",",","'bqe'",",","'tv'",",","'satfinder'","]"],"url":"https:\/\/github.com\/E2OpenPlugins\/e2openplugin-OpenWebif\/blob\/b238b3770b90f49ba076987f66a4f042eb4b318e\/plugin\/controllers\/ajax.py#L53-L57"}