diff --git a/lib/inputstreamhelper/kodiutils.py b/lib/inputstreamhelper/kodiutils.py index 73645149..0cc29257 100644 --- a/lib/inputstreamhelper/kodiutils.py +++ b/lib/inputstreamhelper/kodiutils.py @@ -193,14 +193,11 @@ def get_setting_int(key, default=None): def get_setting_float(key, default=None): """Get an add-on setting as float""" + value = get_setting(key, default) try: - return ADDON.getSettingNumber(key) - except (AttributeError, TypeError): # On Krypton or older, or when not a float - value = get_setting(key, default) - try: - return float(value) - except ValueError: - return default + return float(value) + except ValueError: + return default except RuntimeError: # Occurs when the add-on is disabled return default diff --git a/resources/settings.xml b/resources/settings.xml index 53b42eb1..4a1dfe3a 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -1,9 +1,9 @@ - - - + + +