當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。