def _set_isa_addon_settings(is_4k_capable, hdcp_override): """Method for self-configuring of InputStream Adaptive add-on""" is_helper = inputstreamhelper.Helper('mpd') if not is_helper.check_inputstream(): show_ok_dialog(get_local_string(30154), get_local_string(30046)) return isa_addon = Addon('inputstream.adaptive') isa_addon.setSettingBool('HDCPOVERRIDE', hdcp_override) if isa_addon.getSettingInt('STREAMSELECTION') == 1: # Stream selection must never be set to 'Manual' or cause problems with the streams isa_addon.setSettingInt('STREAMSELECTION', 0) # 'Ignore display' should only be set when Kodi display resolution is not 4K isa_addon.setSettingBool( 'IGNOREDISPLAY', is_4k_capable and (getScreenWidth() != 3840 or getScreenHeight() != 2160))
def _set_isa_addon_settings(is_4k_capable, hdcp_override): """Method for self-configuring of InputStream Adaptive add-on""" try: is_helper = inputstreamhelper.Helper('mpd') if not is_helper.check_inputstream(): show_ok_dialog(get_local_string(30154), get_local_string(30046)) return except Exception as exc: # pylint: disable=broad-except # Captures all types of ISH internal errors import traceback LOG.error(G.py2_decode(traceback.format_exc(), 'latin-1')) raise_from(InputStreamHelperError(str(exc)), exc) isa_addon = Addon('inputstream.adaptive') isa_addon.setSettingBool('HDCPOVERRIDE', hdcp_override) if isa_addon.getSettingInt('STREAMSELECTION') == 1: # Stream selection must never be set to 'Manual' or cause problems with the streams isa_addon.setSettingInt('STREAMSELECTION', 0) # 'Ignore display' should only be set when Kodi display resolution is not 4K isa_addon.setSettingBool('IGNOREDISPLAY', is_4k_capable and (getScreenWidth() != 3840 or getScreenHeight() != 2160))