+
+ def get_netflix_service_url (self):
+ """Returns URL & Port of the internal Netflix HTTP Proxy service
+
+ Returns
+ -------
+ str
+ Url + Port
+ """
+ return 'http://localhost:' + str(self.kodi_helper.addon.getSetting('netflix_service_port'))
+
+ def call_netflix_service (self, params):
+ """Makes a GET request to the internal Netflix HTTP proxy and returns the result
+
+ Parameters
+ ----------
+ params : :obj:`dict` of :obj:`str`
+ List of paramters to be url encoded
+
+ Returns
+ -------
+ :obj:`dict`
+ Netflix Service RPC result
+ """
+ url_values = urllib.urlencode(params)
+ url = self.get_netflix_service_url()
+ full_url = url + '?' + url_values
+ data = urllib2.urlopen(full_url).read()
+ parsed_json = json.loads(data)
+ return parsed_json.get('result', None)
+
+ def open_settings(self, url):
+ """Opens a foreign settings dialog"""
+ is_addon = self.kodi_helper.get_inputstream_addon()
+ url = is_addon if url == 'is' else url
+ return Addon(url).openSettings()