getsubtitles function is defined in web.py in OpenWebIf
e2openplugin-OpenWebif/plugin/controllers/web.py
<------>def P_getsubtitles(self, request):
<------><------>"""
<------><------>Request handler for the `getsubtitles` endpoint.
<------><------>.. note::
<------><------><------>Not available in *Enigma2 WebInterface API*.
<------><------>Args:
<------><------><------>request (twisted.web.server.Request): HTTP request object
<------><------>Returns:
<------><------><------>HTTP response with headers
<------><------>"""
<------><------>service = self.session.nav.getCurrentService()
<------><------>ret = {"subtitlelist": [], "result": False}
<------><------>subtitle = service and service.subtitle()
<------><------>subtitlelist = subtitle and subtitle.getSubtitleList()
<------><------>if subtitlelist:
<------><------><------>for i in 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