当前位置: 首页>>代码示例>>Python>>正文


Python xbmcgui.ALPHANUM_HIDE_INPUT属性代码示例

本文整理汇总了Python中xbmcgui.ALPHANUM_HIDE_INPUT属性的典型用法代码示例。如果您正苦于以下问题:Python xbmcgui.ALPHANUM_HIDE_INPUT属性的具体用法?Python xbmcgui.ALPHANUM_HIDE_INPUT怎么用?Python xbmcgui.ALPHANUM_HIDE_INPUT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在xbmcgui的用法示例。


在下文中一共展示了xbmcgui.ALPHANUM_HIDE_INPUT属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_keyboard_new

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ALPHANUM_HIDE_INPUT [as 别名]
def get_keyboard_new(heading, default='', hide_input=False):

    """
    This function has been in support since XBMC Gotham v13
    """

    if hide_input is False:
        hide_input = 0
    elif hide_input is True:
        hide_input = xbmcgui.ALPHANUM_HIDE_INPUT

    dialog = xbmcgui.Dialog()

    keyboard = dialog.input(heading, defaultt=default, type=0, option=hide_input)

    if keyboard:

        return keyboard

    return None 
开发者ID:tvaddonsco,项目名称:script.module.urlresolver,代码行数:22,代码来源:kodi.py

示例2: open_url

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ALPHANUM_HIDE_INPUT [as 别名]
def open_url(self, url, stream=False, check=False, cred=None, count=0):
        if not url:
            return False

        valid = self.check_url(url, cred)

        if not valid:
            return False
        if check:
            return True
        if valid == 'auth' and not cred:
            cred = (xbmcgui.Dialog().input(heading=xbmc.getLocalizedString(1014)) or '', xbmcgui.Dialog().input(heading=xbmc.getLocalizedString(733), option=xbmcgui.ALPHANUM_HIDE_INPUT) or '')

        response = requests.get(url, timeout=10.000, stream=stream, auth=cred)
        if response.status_code == 401:
            if count > 2 or not xbmcgui.Dialog().yesno(self.addon.getAddonInfo('name'), self.addon.getLocalizedString(32056), yeslabel=self.addon.getLocalizedString(32057), nolabel=xbmc.getLocalizedString(222)):
                xbmcgui.Dialog().ok(self.addon.getAddonInfo('name'), self.addon.getLocalizedString(32055))
                return False
            count += 1
            cred = (xbmcgui.Dialog().input(heading=xbmc.getLocalizedString(1014)) or '', xbmcgui.Dialog().input(heading=xbmc.getLocalizedString(733), option=xbmcgui.ALPHANUM_HIDE_INPUT) or '')
            response = self.open_url(url, stream, check, cred, count)
        return response 
开发者ID:jurialmunkey,项目名称:plugin.video.themoviedb.helper,代码行数:24,代码来源:downloader.py

示例3: ask_for_password

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ALPHANUM_HIDE_INPUT [as 别名]
def ask_for_password():
    """Ask the user for the password"""
    return g.py2_decode(xbmcgui.Dialog().input(
        heading=common.get_local_string(30004),
        type=xbmcgui.INPUT_ALPHANUM,
        option=xbmcgui.ALPHANUM_HIDE_INPUT)) or None 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:8,代码来源:dialogs.py

示例4: login_dialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ALPHANUM_HIDE_INPUT [as 别名]
def login_dialog():
    username = dialog.input(u'用户名:', type=xbmcgui.INPUT_ALPHANUM)
    password = dialog.input(u'密码:', type=xbmcgui.INPUT_ALPHANUM, option=xbmcgui.ALPHANUM_HIDE_INPUT)
    if username and password:
        cookie,tokens = get_auth.run(username,password)
        if tokens:
            save_user_info(username,password,cookie,tokens)
            homemenu = plugin.get_storage('homemenu')
            homemenu.clear()
            dialog.ok('',u'登录成功', u'点击返回首页并耐心等待')
            items = [{'label': u'<< 返回首页', 'path': plugin.url_for('main_menu')}]
            return plugin.finish(items, update_listing=True)
    else:
        dialog.ok('Error',u'用户名或密码不能为空')
    return None 
开发者ID:taxigps,项目名称:xbmc-addons-chinese,代码行数:17,代码来源:default.py

示例5: login

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ALPHANUM_HIDE_INPUT [as 别名]
def login():
    username = addon.getSetting('username')
    password = addon.getSetting('password')
    subscription_type = [SubscriptionType.hifi, SubscriptionType.premium][int('0' + addon.getSetting('subscription_type'))]

    if not username or not password:
        # Ask for username/password
        dialog = xbmcgui.Dialog()
        username = dialog.input(_T(30008), username)
        if not username:
            return
        password = dialog.input(_T(30009), option=xbmcgui.ALPHANUM_HIDE_INPUT)
        if not password:
            return
        selected = dialog.select(_T(30010), [SubscriptionType.hifi, SubscriptionType.premium])
        if selected < 0:
            return
        subscription_type = [SubscriptionType.hifi, SubscriptionType.premium][selected]

    ok = session.login(username, password, subscription_type)
    if ok and (not addon.getSetting('username') or not addon.getSetting('password')):
        # Ask about remembering username/password
        dialog = xbmcgui.Dialog()
        if dialog.yesno(plugin.name, _T(30209)):
            addon.setSetting('username', username)
            addon.setSetting('password', password)
        else:
            addon.setSetting('password', '')
    if not ok:
        xbmcgui.Dialog().notification(plugin.name, _T(30253) , icon=xbmcgui.NOTIFICATION_ERROR)
    xbmc.executebuiltin('Container.Refresh()') 
开发者ID:arnesongit,项目名称:plugin.audio.tidal2,代码行数:33,代码来源:addon.py

示例6: show_password_dialog

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import ALPHANUM_HIDE_INPUT [as 别名]
def show_password_dialog(self):
        """
        Asks the user for its Netflix password

        :returns: str - Netflix password
        """
        dlg = xbmcgui.Dialog()
        dialog = dlg.input(
            heading=self.get_local_string(string_id=30004),
            type=xbmcgui.INPUT_ALPHANUM,
            option=xbmcgui.ALPHANUM_HIDE_INPUT)
        return dialog 
开发者ID:asciidisco,项目名称:plugin.video.netflix,代码行数:14,代码来源:Dialogs.py


注:本文中的xbmcgui.ALPHANUM_HIDE_INPUT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。