コード例 #1
0
    def __getitem__(self, key):
        """
        Returns the value of a setting as a "unicode string".

        :param str key: ID of the setting to access.

        :return: Setting as a "unicode string".
        :rtype: str
        """
        return addon_data.getSetting(key)
コード例 #2
0
    def __getitem__(self, key):
        """
        Returns the value of a setting as a "unicode string".

        :param str key: ID of the setting to access.

        :return: Setting as a "unicode string".
        :rtype: str
        """
        return addon_data.getSetting(key)
コード例 #3
0
    def get_string(key, addon_id=None):
        """
        Returns the value of a setting as a "unicode string".

        :param str key: ID of the setting to access.
        :param str addon_id: [opt] ID of another add-on to extract settings from.

        :raises RuntimeError: If ``addon_id`` is given and there is no add-on with given ID.

        :return: Setting as a "unicode string".
        :rtype: str
        """
        if addon_id:
            return xbmcaddon.Addon(addon_id).getSetting(key)
        else:
            return addon_data.getSetting(key)
コード例 #4
0
    def get_string(key, addon_id=None):
        """
        Returns the value of a setting as a "unicode string".

        :param str key: ID of the setting to access.
        :param str addon_id: [opt] ID of another add-on to extract settings from.

        :raises RuntimeError: If ``addon_id`` is given and there is no add-on with given ID.

        :return: Setting as a "unicode string".
        :rtype: str
        """
        if addon_id:
            return xbmcaddon.Addon(addon_id).getSetting(key)
        else:
            return addon_data.getSetting(key)